diff gui/util/string.c @ 34628:ee78c9c66508

Add doxgen comment to gstrncmp(). Additionally, use correct data type for n.
author ib
date Mon, 13 Feb 2012 16:10:39 +0000
parents abcf26dcec6b
children 531c69f090da
line wrap: on
line diff
--- a/gui/util/string.c	Mon Feb 13 16:01:55 2012 +0000
+++ b/gui/util/string.c	Mon Feb 13 16:10:39 2012 +0000
@@ -173,7 +173,16 @@
     return strcasecmp(a, b);
 }
 
-int gstrncmp(const char *a, const char *b, int n)
+/**
+ * @brief A strncmp() that can handle NULL pointers.
+ *
+ * @param a string to be compared
+ * @param b string which is compared
+ * @param n number of characters compared at the most
+ *
+ * @return return value of strncmp() or -1, if a or b are NULL
+ */
+int gstrncmp(const char *a, const char *b, size_t n)
 {
     if (!a && !b)
         return 0;