mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
xfree86: Get rid of xstrdup when argument is definitely non-NULL
ditto for XFree86 Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
416d228481
commit
e4570f5db5
3 changed files with 14 additions and 14 deletions
|
|
@ -135,7 +135,7 @@ InitPathList(const char *path)
|
|||
if (!path)
|
||||
return defaultPathList;
|
||||
|
||||
fullpath = xstrdup(path);
|
||||
fullpath = strdup(path);
|
||||
if (!fullpath)
|
||||
return NULL;
|
||||
elem = strtok(fullpath, ",");
|
||||
|
|
@ -353,7 +353,7 @@ InitSubdirs(const char **subdirlist)
|
|||
sprintf(subdirs[i], "%s%s%s/", *s, slash, osname);
|
||||
i++;
|
||||
/* path as given */
|
||||
subdirs[i] = xstrdup(*s);
|
||||
subdirs[i] = strdup(*s);
|
||||
i++;
|
||||
s++;
|
||||
if (indefault && !s) {
|
||||
|
|
@ -1246,7 +1246,7 @@ LoaderGetCanonicalName(const char *modname, PatternPtr patterns)
|
|||
}
|
||||
|
||||
/* If there is no match, return the whole name minus the leading path */
|
||||
return xstrdup(s);
|
||||
return strdup(s);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue