Commit 8e5b1e7a authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Keyboard.c: Replace some memsets by zero initialization

parent de9b4edf
...@@ -893,7 +893,7 @@ XkbError: ...@@ -893,7 +893,7 @@ XkbError:
char *nxagentXkbConfigFilePath; char *nxagentXkbConfigFilePath;
XkbComponentNamesRec names; XkbComponentNamesRec names = {0};
char *rules, *variants, *options; char *rules, *variants, *options;
#ifdef TEST #ifdef TEST
...@@ -904,7 +904,6 @@ XkbError: ...@@ -904,7 +904,6 @@ XkbError:
fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL");
#endif #endif
memset(&names, 0, sizeof(XkbComponentNamesRec));
rules = nxagentXkbGetRules(); rules = nxagentXkbGetRules();
...@@ -1257,11 +1256,10 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode) ...@@ -1257,11 +1256,10 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode)
if (!noXkbExtension) if (!noXkbExtension)
{ {
DeviceIntPtr dev; DeviceIntPtr dev;
xkbNewKeyboardNotify nkn; xkbNewKeyboardNotify nkn = {0};
dev = inputInfo.keyboard; dev = inputInfo.keyboard;
memset(&nkn, 0, sizeof(xkbNewKeyboardNotify));
nkn.deviceID = nkn.oldDeviceID = dev -> id; nkn.deviceID = nkn.oldDeviceID = dev -> id;
nkn.minKeyCode = 8; nkn.minKeyCode = 8;
nkn.maxKeyCode = 255; nkn.maxKeyCode = 255;
...@@ -1279,9 +1277,8 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode) ...@@ -1279,9 +1277,8 @@ void nxagentNotifyKeyboardChanges(int oldMinKeycode, int oldMaxKeycode)
#endif #endif
int i; int i;
xEvent event; xEvent event = {0};
memset(&event, 0, sizeof(xEvent));
event.u.u.type = MappingNotify; event.u.u.type = MappingNotify;
event.u.mappingNotify.request = MappingKeyboard; event.u.mappingNotify.request = MappingKeyboard;
event.u.mappingNotify.firstKeyCode = inputInfo.keyboard -> key -> curKeySyms.minKeyCode; event.u.mappingNotify.firstKeyCode = inputInfo.keyboard -> key -> curKeySyms.minKeyCode;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment