diff options
Diffstat (limited to 'xorg-server/hw/dmx/input/lnx-keyboard.c')
-rw-r--r-- | xorg-server/hw/dmx/input/lnx-keyboard.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xorg-server/hw/dmx/input/lnx-keyboard.c b/xorg-server/hw/dmx/input/lnx-keyboard.c index 42a807b11..55ff9f859 100644 --- a/xorg-server/hw/dmx/input/lnx-keyboard.c +++ b/xorg-server/hw/dmx/input/lnx-keyboard.c @@ -358,8 +358,7 @@ static unsigned char at2lnx[NUM_KEYCODES] = /** Create a private structure for use within this file. */ pointer kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard) { - myPrivate *priv = xalloc(sizeof(*priv)); - memset(priv, 0, sizeof(*priv)); + myPrivate *priv = calloc(1, sizeof(*priv)); priv->fd = -1; priv->pKeyboard = pKeyboard; return priv; @@ -368,7 +367,7 @@ pointer kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard) /** Destroy a private structure. */ void kbdLinuxDestroyPrivate(pointer priv) { - if (priv) xfree(priv); + if (priv) free(priv); } /** Ring the bell. |