dmx: Get rid of xstrdup when argument is definitely non-NULL

ditto for DMX

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Mikhail Gusarov 2010-06-04 17:00:15 +07:00
parent 6592db6bb5
commit 1615836695
2 changed files with 3 additions and 3 deletions

View File

@ -885,7 +885,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
&& dmxL->deviceId < 0) { && dmxL->deviceId < 0) {
dmxL->deviceId = devices[i].id; dmxL->deviceId = devices[i].id;
dmxL->deviceName = (devices[i].name dmxL->deviceName = (devices[i].name
? xstrdup(devices[i].name) ? strdup(devices[i].name)
: NULL); : NULL);
} }
} }
@ -918,7 +918,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI)
dmxLocal->sendsCore = FALSE; dmxLocal->sendsCore = FALSE;
dmxLocal->deviceId = devices[i].id; dmxLocal->deviceId = devices[i].id;
dmxLocal->deviceName = (devices[i].name dmxLocal->deviceName = (devices[i].name
? xstrdup(devices[i].name) ? strdup(devices[i].name)
: NULL); : NULL);
} }
} }

View File

@ -439,6 +439,6 @@ void kbdUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
kbdUSBGetMap(pDev, &info->keySyms, info->modMap); kbdUSBGetMap(pDev, &info->keySyms, info->modMap);
info->focusClass = 1; info->focusClass = 1;
info->kbdFeedbackClass = 1; info->kbdFeedbackClass = 1;
info->names.keycodes = xstrdup("powerpcps2"); info->names.keycodes = strdup("powerpcps2");
info->force = 1; info->force = 1;
} }