diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-07-22 22:12:51 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-12-14 00:08:33 +0100 |
commit | 8e5b1e7a261f8861fac1268d8c7c97af96f52bbe (patch) | |
tree | 34999bc3cec14863e86da9fa3b79be78cd814da3 /nx-X11/programs/Xserver | |
parent | de9b4edf94062e5cc58161fd3b8d28fe9cd115c2 (diff) | |
download | nx-libs-8e5b1e7a261f8861fac1268d8c7c97af96f52bbe.tar.gz nx-libs-8e5b1e7a261f8861fac1268d8c7c97af96f52bbe.tar.bz2 nx-libs-8e5b1e7a261f8861fac1268d8c7c97af96f52bbe.zip |
Keyboard.c: Replace some memsets by zero initialization
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index e55dbfbce..8ae64ee00 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -893,7 +893,7 @@ XkbError: char *nxagentXkbConfigFilePath; - XkbComponentNamesRec names; + XkbComponentNamesRec names = {0}; char *rules, *variants, *options; #ifdef TEST @@ -904,7 +904,6 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); #endif - memset(&names, 0, sizeof(XkbComponentNamesRec)); rules = nxagentXkbGetRules(); @@ -1257,11 +1256,10 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode) if (!noXkbExtension) { DeviceIntPtr dev; - xkbNewKeyboardNotify nkn; + xkbNewKeyboardNotify nkn = {0}; dev = inputInfo.keyboard; - memset(&nkn, 0, sizeof(xkbNewKeyboardNotify)); nkn.deviceID = nkn.oldDeviceID = dev -> id; nkn.minKeyCode = 8; nkn.maxKeyCode = 255; @@ -1279,9 +1277,8 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode) #endif int i; - xEvent event; + xEvent event = {0}; - memset(&event, 0, sizeof(xEvent)); event.u.u.type = MappingNotify; event.u.mappingNotify.request = MappingKeyboard; event.u.mappingNotify.firstKeyCode = inputInfo.keyboard -> key -> curKeySyms.minKeyCode; |