Commit eb4abe4c authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Keyboard.c: Use calloc instead of malloc + memset

parent 5c4a001a
......@@ -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");
......
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