]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/bsys.c
- Apply patch from Christopher Hull
[bacula/bacula] / bacula / src / lib / bsys.c
index 3f6afaa3caf67c14a43d4c1b642da7be5469c67e..c620740a5a59d6881affb1e786d3a1f85957e4dc 100644 (file)
@@ -8,7 +8,7 @@
  *   Version $Id$
  */
 /*
-   Copyright (C) 2000-2005 Kern Sibbald
+   Copyright (C) 2000-2006 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
@@ -113,6 +113,16 @@ char *bstrncat(char *dest, POOL_MEM &src, int maxlen)
    return dest;
 }
 
+/*
+ * Allows one or both pointers to be NULL
+ */
+bool bstrcmp(const char *s1, const char *s2)
+{
+   if (s1 == s2) return true;
+   if (s1 == NULL || s2 == NULL) return false;
+   return strcmp(s1, s2) == 0;
+}
+
 /*
  * Get character length of UTF-8 string
  *