projects
/
platform
/
upstream
/
libxkbcommon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71baa3d
)
xkbcomp: Back out strdup warning cleanup
author
Dan Nicholson
<dbn.lists@gmail.com>
Sat, 4 Apr 2009 03:33:01 +0000
(20:33 -0700)
committer
Dan Nicholson
<dbn.lists@gmail.com>
Sat, 4 Apr 2009 03:34:19 +0000
(20:34 -0700)
There are some spots in the code that use strdup without checking the
argument, so we need this to not segfault. Cleanup later...
src/xkbcomp/utils.h
patch
|
blob
|
history
diff --git
a/src/xkbcomp/utils.h
b/src/xkbcomp/utils.h
index
acf6e14
..
f25f3e5
100644
(file)
--- a/
src/xkbcomp/utils.h
+++ b/
src/xkbcomp/utils.h
@@
-175,7
+175,7
@@
extern int
uStrCasePrefix(const char *p, char *str);
#endif
#ifdef HAVE_STRDUP
-#define uStringDup(s1) (
strdup(s1)
)
+#define uStringDup(s1) (
(s1) ? strdup(s1) : NULL
)
#else
extern char *
uStringDup(const char *s);