aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xkb/ddxLoad.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-02-13 21:36:03 -0800
committerUlrich Sibiller <uli42@gmx.de>2017-03-03 21:33:34 +0100
commitbdfb52193b5a2c5e44969b11d997ce19f0310af9 (patch)
tree7f2b93218eddb984f5ae27e0aa086393e184476c /nx-X11/programs/Xserver/xkb/ddxLoad.c
parente61e9795c3d19b163ebea9a230c2acc718a70d79 (diff)
downloadnx-libs-bdfb52193b5a2c5e44969b11d997ce19f0310af9.tar.gz
nx-libs-bdfb52193b5a2c5e44969b11d997ce19f0310af9.tar.bz2
nx-libs-bdfb52193b5a2c5e44969b11d997ce19f0310af9.zip
Replace _XkbDupString with Xstrdup
The two functions have identical semantics, including safely returning NULL when NULL is passed in (which POSIX strdup does not guarantee). Some callers could probably be adjusted to call libc strdup directly, when we know the input is non-NULL. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/programs/Xserver/xkb/ddxLoad.c')
-rw-r--r--nx-X11/programs/Xserver/xkb/ddxLoad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c
index 4934d266c..5f24e9ccc 100644
--- a/nx-X11/programs/Xserver/xkb/ddxLoad.c
+++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c
@@ -542,8 +542,8 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile;
}
}
if ((outFile= strrchr(file,'/'))!=NULL)
- outFile= _XkbDupString(&outFile[1]);
- else outFile= _XkbDupString(file);
+ outFile= Xstrdup(&outFile[1]);
+ else outFile= Xstrdup(file);
XkbEnsureSafeMapName(outFile);
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));