diff options
author | Adam Jackson <ajax@redhat.com> | 2009-05-08 14:15:21 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2009-05-08 14:15:21 -0400 |
commit | d36a99d961c6649ca1b0319c2aadc6763edb07ad (patch) | |
tree | 5dd7b28ec56eab55806c209d327b03cb49cc54fd /src/XKBfileInt.h | |
parent | 29f27b16dbe511a27a0e953b32913f9d9bf24f2d (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.h | 6 |
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 |