diff options
author | falkTX <falktx@falktx.com> | 2023-10-21 13:33:25 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-10-21 10:44:58 -0400 |
commit | 0fed0b5f864cf70e2ed3a82236fd81554f52948e (patch) | |
tree | 73d25e527a21d39f872963e1e9dff3a6103cd7ec | |
parent | a7803c92f144221edba9a966eb664da8049ce7bf (diff) | |
download | pugl-0fed0b5f864cf70e2ed3a82236fd81554f52948e.tar.gz pugl-0fed0b5f864cf70e2ed3a82236fd81554f52948e.tar.bz2 pugl-0fed0b5f864cf70e2ed3a82236fd81554f52948e.zip |
X11: Use PUGL_INIT_STRUCT to initialize char arrays
-rw-r--r-- | src/x11.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -665,7 +665,7 @@ puglRealize(PuglView* const view) updateSizeHints(view); // Set PID and hostname so the window manager can access our process - char hostname[256] = {0}; + char hostname[256] = PUGL_INIT_STRUCT; const long pid = (long)getpid(); if (pid > 0 && !gethostname(hostname, sizeof(hostname))) { hostname[sizeof(hostname) - 1] = '\0'; @@ -884,7 +884,7 @@ translateKey(PuglView* const view, XEvent* const xevent, PuglEvent* const event) xevent->xkey.state = xevent->xkey.state & ~(unsigned)(ControlMask|ShiftMask); // Lookup unshifted key - char ustr[8] = {0}; + char ustr[8] = PUGL_INIT_STRUCT; KeySym sym = 0; const int ufound = XLookupString(&xevent->xkey, ustr, 8, &sym, NULL); const PuglKey special = keySymToSpecial(sym); @@ -899,7 +899,7 @@ translateKey(PuglView* const view, XEvent* const xevent, PuglEvent* const event) // Lookup shifted key for possible text event xevent->xkey.state = state; - char sstr[8] = {0}; + char sstr[8] = PUGL_INIT_STRUCT; const int sfound = lookupString(view->impl->xic, xevent, sstr, &sym); if (sfound > 0) { // Dispatch key event now |