[PATCH keyboard] bsd: Replace deprecated xfree/xcalloc with free & calloc
Alexandr Shadchin
alexandr.shadchin at gmail.com
Sat Jan 8 04:09:38 PST 2011
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
---
src/bsd_kbd.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c
index ebaeae5..127b6ab 100644
--- a/src/bsd_kbd.c
+++ b/src/bsd_kbd.c
@@ -354,11 +354,11 @@ OpenKeyboard(InputInfoPtr pInfo)
#endif
default:
xf86Msg(X_ERROR,"\"%s\" is not a valid keyboard protocol name\n", s);
- xfree(s);
+ free(s);
return FALSE;
}
xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s);
- xfree(s);
+ free(s);
s = xf86SetStrOption(pInfo->options, "Device", NULL);
if (s == NULL) {
@@ -375,12 +375,12 @@ OpenKeyboard(InputInfoPtr pInfo)
pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL);
if (pInfo->fd == -1) {
xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s);
- xfree(s);
+ free(s);
return FALSE;
}
pKbd->isConsole = FALSE;
pKbd->consType = xf86Info.consType;
- xfree(s);
+ free(s);
}
#ifdef WSCONS_SUPPORT
@@ -445,8 +445,8 @@ xf86OSKbdPreInit(InputInfoPtr pInfo)
pKbd->OpenKeyboard = OpenKeyboard;
pKbd->CustomKeycodes = FALSE;
-
- pKbd->private = xcalloc(sizeof(BsdKbdPrivRec), 1);
+
+ pKbd->private = calloc(sizeof(BsdKbdPrivRec), 1);
if (pKbd->private == NULL) {
xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n");
return FALSE;
--
1.7.3.5
More information about the xorg-devel
mailing list