]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/alloc_str.c
Added string functions for matching of prefixes and suffixes
[libucw.git] / ucw / alloc_str.c
index 5b3d839253b1e5b7c0f25a3adb6d5ea395eb4332..a9543c5b96d459c86aefa489502f0e5683244ee0 100644 (file)
@@ -14,6 +14,8 @@
 char *
 xstrdup(const char *s)
 {
+  if (!s)
+    return NULL;
   uns l = strlen(s) + 1;
   return memcpy(xmalloc(l), s, l);
 }