[PATCH 2/8] dmx: Get rid of xstrdup when argument is definitely non-NULL
Mikhail Gusarov
dottedmag at dottedmag.net
Fri Jun 4 03:24:59 PDT 2010
ditto for DMX
Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
---
hw/dmx/input/dmxinputinit.c | 4 ++--
hw/dmx/input/usb-keyboard.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/dmx/input/dmxinputinit.c b/hw/dmx/input/dmxinputinit.c
index 814fc1a..020e21a 100644
--- a/hw/dmx/input/dmxinputinit.c
+++ b/hw/dmx/input/dmxinputinit.c
@@ -885,7 +885,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
&& dmxL->deviceId < 0) {
dmxL->deviceId = devices[i].id;
dmxL->deviceName = (devices[i].name
- ? xstrdup(devices[i].name)
+ ? strdup(devices[i].name)
: NULL);
}
}
@@ -918,7 +918,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
dmxLocal->sendsCore = FALSE;
dmxLocal->deviceId = devices[i].id;
dmxLocal->deviceName = (devices[i].name
- ? xstrdup(devices[i].name)
+ ? strdup(devices[i].name)
: NULL);
}
}
diff --git a/hw/dmx/input/usb-keyboard.c b/hw/dmx/input/usb-keyboard.c
index dc575fe..9db1adb 100644
--- a/hw/dmx/input/usb-keyboard.c
+++ b/hw/dmx/input/usb-keyboard.c
@@ -439,6 +439,6 @@ void kbdUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
kbdUSBGetMap(pDev, &info->keySyms, info->modMap);
info->focusClass = 1;
info->kbdFeedbackClass = 1;
- info->names.keycodes = xstrdup("powerpcps2");
+ info->names.keycodes = strdup("powerpcps2");
info->force = 1;
}
--
1.7.1
More information about the xorg-devel
mailing list