XKB: Fix garbage initialization

XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify
changedControls mask because it was uninitialized on the stack.

Found by clang

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Jeremy Huddleston 2010-03-23 10:37:36 -07:00 committed by Peter Hutterer
parent 0ecfab89d1
commit 8311cd5f89

View File

@ -753,7 +753,7 @@ XkbSrvLedInfoPtr sli;
if (cause!=NULL) { if (cause!=NULL) {
xkbControlsNotify cn; xkbControlsNotify cn;
cn.numGroups= ctrls->num_groups; cn.numGroups= ctrls->num_groups;
cn.changedControls|= XkbControlsEnabledMask; cn.changedControls= XkbControlsEnabledMask;
cn.enabledControls= ctrls->enabled_ctrls; cn.enabledControls= ctrls->enabled_ctrls;
cn.enabledControlChanges= (ctrls->enabled_ctrls^old); cn.enabledControlChanges= (ctrls->enabled_ctrls^old);
cn.keycode= cause->kc; cn.keycode= cause->kc;