diff options
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 22cf1b44d..1d3c94189 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1337,11 +1337,7 @@ int nxagentResetKeyboard(void) savedBellPercent, savedBellPitch, savedBellDuration); #endif - if (devBackup = malloc(sizeof(DeviceIntRec))) - { - memset(devBackup, 0, sizeof(DeviceIntRec)); - } - else + if (!(devBackup = calloc(1, sizeof(DeviceIntRec)))) { #ifdef PANIC fprintf(stderr, "nxagentResetKeyboard: PANIC! Can't allocate backup structure.\n"); |