diff options
author | Trevor Woerner <twoerner@gmail.com> | 2010-10-17 21:25:56 -0400 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-10-18 12:00:06 +1000 |
commit | 38363bde5d94c9a8f163fde31ede067f6d0d1669 (patch) | |
tree | 62094598c86a2412d9b1d4f3eb3e69c8078d079d | |
parent | d209590c06e7a4df9d921ff53cb9792e9beb1aeb (diff) |
Deprecated code cleanup.
Replace calls to deprecated functions (Xfree(), Xcalloc(), Xmalloc(), etc)
with calls to standard dynamic memory functions (free(), calloc(), malloc(),
etc) in driver code.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/jstk.c | 8 | ||||
-rw-r--r-- | src/jstk_key.c | 8 | ||||
-rw-r--r-- | src/jstk_options.c | 4 |
3 files changed, 10 insertions, 10 deletions
@@ -524,7 +524,7 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) goto SetupProc_fail; } - local->private = (JoystickDevPtr)xalloc(sizeof(JoystickDevRec)); + local->private = (JoystickDevPtr)malloc(sizeof(JoystickDevRec)); priv = (JoystickDevPtr)local->private; local->name = dev->identifier; @@ -657,7 +657,7 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) DBG(1, xf86Msg(X_CONFIG, "Autorepeat set to delay=%d, interval=%d\n", priv->repeat_delay,priv->repeat_interval)); } - xfree(s); + free(s); } priv->rmlvo.rules = xf86SetStrOption(dev->commonOptions, "xkb_rules", NULL); @@ -722,7 +722,7 @@ jstkCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) SetupProc_fail: if (priv) - xfree(priv); + free(priv); if (local) local->private = NULL; return NULL; @@ -754,7 +754,7 @@ jstkCoreUnInit(InputDriverPtr drv, device->keyboard_device = NULL; } - xfree (device); + free (device); local->private = NULL; xf86DeleteInput(local, 0); } diff --git a/src/jstk_key.c b/src/jstk_key.c index c841cf0..35b8928 100644 --- a/src/jstk_key.c +++ b/src/jstk_key.c @@ -506,7 +506,7 @@ jstkKeyboardPreInit(InputDriverPtr drv, IDevPtr _dev, int flags) goto SetupProc_fail; } - dev = xcalloc(sizeof(IDevRec), 1); + dev = calloc(sizeof(IDevRec), 1); strcpy(name, _dev->identifier); strcat(name, " (keys)"); dev->identifier = xstrdup(name); @@ -544,9 +544,9 @@ SetupProc_fail: if (local) local->private = NULL; if (dev) { - if (dev->identifier) xfree(dev->identifier); - if (dev->driver) xfree(dev->driver); - xfree(dev); + if (dev->identifier) free(dev->identifier); + if (dev->driver) free(dev->driver); + free(dev); } return NULL; } diff --git a/src/jstk_options.c b/src/jstk_options.c index 4ce9d36..65f25f8 100644 --- a/src/jstk_options.c +++ b/src/jstk_options.c @@ -155,7 +155,7 @@ jstkParseButtonOption(const char* org, xf86Msg(X_WARNING, "%s: error parsing button parameter.\n", name); } - xfree(param); + free(param); } @@ -293,5 +293,5 @@ jstkParseAxisOption(const char* org, }else xf86Msg(X_WARNING, "%s: error parsing deadzone.\n", name); } - xfree(param); + free(param); } |