xkbcomp: Back out strdup warning cleanup There are some spots in the code that use strdup without checking the argument, so we need this to not segfault. Cleanup later...
diff --git a/src/xkbcomp/utils.h b/src/xkbcomp/utils.h
index acf6e14..f25f3e5 100644
--- 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);