mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 08:00:33 +01:00
treewide: replace strdup() calls to Xstrdup()
This has been nothing but an alias for two decades now (somewhere in R6.6),
so there doesn't seem to be any practical need for this indirection.
The macro still needs to remain, as long as (external) drivers still using it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1529>
(cherry picked from commit 9ec31d1a88)
This commit is contained in:
parent
173b5541d0
commit
144f197282
7 changed files with 11 additions and 11 deletions
|
|
@ -273,7 +273,7 @@ StringToBusType(const char *busID, const char **retID)
|
|||
return BUS_PCI;
|
||||
}
|
||||
|
||||
s = xstrdup(busID);
|
||||
s = Xstrdup(busID);
|
||||
p = strtok(s, ":");
|
||||
if (p == NULL || *p == 0) {
|
||||
free(s);
|
||||
|
|
|
|||
|
|
@ -716,7 +716,7 @@ MergeInputClasses(const InputInfoPtr idev, const InputAttributes * attrs)
|
|||
classopts = xf86optionListDup(cl->option_lst);
|
||||
if (cl->driver) {
|
||||
free((void *) idev->driver);
|
||||
idev->driver = xstrdup(cl->driver);
|
||||
idev->driver = Xstrdup(cl->driver);
|
||||
if (!idev->driver) {
|
||||
xf86Msg(X_ERROR, "Failed to allocate memory while merging "
|
||||
"InputClass configuration");
|
||||
|
|
@ -1043,7 +1043,7 @@ NewInputDeviceRequest(InputOption *options, InputAttributes * attrs,
|
|||
rval = BadRequest;
|
||||
goto unwind;
|
||||
}
|
||||
pInfo->driver = xstrdup(value);
|
||||
pInfo->driver = Xstrdup(value);
|
||||
if (!pInfo->driver) {
|
||||
rval = BadAlloc;
|
||||
goto unwind;
|
||||
|
|
@ -1055,7 +1055,7 @@ NewInputDeviceRequest(InputOption *options, InputAttributes * attrs,
|
|||
rval = BadRequest;
|
||||
goto unwind;
|
||||
}
|
||||
pInfo->name = xstrdup(value);
|
||||
pInfo->name = Xstrdup(value);
|
||||
if (!pInfo->name) {
|
||||
rval = BadAlloc;
|
||||
goto unwind;
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func)
|
|||
if (StringToBusType(busID, &id) != BUS_PCI)
|
||||
return FALSE;
|
||||
|
||||
s = xstrdup(id);
|
||||
s = Xstrdup(id);
|
||||
p = strtok(s, ":");
|
||||
if (p == NULL || *p == 0) {
|
||||
free(s);
|
||||
|
|
|
|||
|
|
@ -733,7 +733,7 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
|
|||
* check the elements in the path
|
||||
*/
|
||||
if (PathIsAbsolute(module))
|
||||
found = xstrdup(module);
|
||||
found = Xstrdup(module);
|
||||
path_elem = pathlist;
|
||||
while (!found && *path_elem != NULL) {
|
||||
found = FindModule(m, *path_elem, patterns);
|
||||
|
|
|
|||
|
|
@ -681,7 +681,7 @@ xf86GetConfigModes(XF86ConfModeLinePtr conf_mode)
|
|||
mode = calloc(1, sizeof(DisplayModeRec));
|
||||
if (!mode)
|
||||
continue;
|
||||
mode->name = xstrdup(conf_mode->ml_identifier);
|
||||
mode->name = Xstrdup(conf_mode->ml_identifier);
|
||||
if (!mode->name) {
|
||||
free(mode);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ setup_ei(ClientPtr client)
|
|||
}
|
||||
|
||||
xwl_ei_client = calloc(1, sizeof *xwl_ei_client);
|
||||
xwl_ei_client->cmdline = xstrdup(cmdname);
|
||||
xwl_ei_client->cmdline = Xstrdup(cmdname);
|
||||
if (!xwl_ei_client) {
|
||||
error_ei("OOM, cannot setup EI\n");
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -1464,8 +1464,8 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
|
|||
strcpy(dprop->value, sprop->value);
|
||||
}
|
||||
else {
|
||||
dprop->name = xstrdup(sprop->name);
|
||||
dprop->value = xstrdup(sprop->value);
|
||||
dprop->name = Xstrdup(sprop->name);
|
||||
dprop->value = Xstrdup(sprop->value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1518,7 +1518,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst)
|
|||
strcpy(dcolor->spec, scolor->spec);
|
||||
}
|
||||
else {
|
||||
dcolor->spec = xstrdup(scolor->spec);
|
||||
dcolor->spec = Xstrdup(scolor->spec);
|
||||
}
|
||||
dcolor->pixel = scolor->pixel;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue