summaryrefslogtreecommitdiff
path: root/src/XKBfileInt.h
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-05-08 14:15:21 -0400
committerAdam Jackson <ajax@redhat.com>2009-05-08 14:15:21 -0400
commitd36a99d961c6649ca1b0319c2aadc6763edb07ad (patch)
tree5dd7b28ec56eab55806c209d327b03cb49cc54fd /src/XKBfileInt.h
parent29f27b16dbe511a27a0e953b32913f9d9bf24f2d (diff)
Semi-revert 33b839e16fe681ba915658f824ceb1b252084ea4
_XkbDupString() checks for NULL, strdup doesn't. Still, implement in terms of real strdup and skip the calloc.
Diffstat (limited to 'src/XKBfileInt.h')
-rw-r--r--src/XKBfileInt.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/XKBfileInt.h b/src/XKBfileInt.h
index 5573638..a99b7c8 100644
--- a/src/XKBfileInt.h
+++ b/src/XKBfileInt.h
@@ -65,6 +65,12 @@
_XFUNCPROTOBEGIN
+static inline
+char *_XkbDupString(const char *s)
+{
+ return s ? strdup(s) : NULL;
+}
+
#define _XkbStrCaseEqual(s1,s2) (_XkbStrCaseCmp(s1,s2)==0)
#ifdef NEED_STRCASECMP