]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Added a strncaseeq variant to the string comparison macros
authorMartin Willi <martin@revosec.ch>
Fri, 10 Dec 2010 13:22:18 +0000 (14:22 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 5 Jan 2011 15:45:59 +0000 (16:45 +0100)
src/libstrongswan/utils.h

index c41e1d6b3dd6fb82f63582ac4aa310282f92b120..8ab7322057f2ece37186b8d9fff1be7d38d8a125 100644 (file)
@@ -57,7 +57,7 @@
 #define streq(x,y) (strcmp(x, y) == 0)
 
 /**
- * Macro compares two strings for equality
+ * Macro compares two strings for equality, length limited
  */
 #define strneq(x,y,len) (strncmp(x, y, len) == 0)
 
  */
 #define strcaseeq(x,y) (strcasecmp(x, y) == 0)
 
+/**
+ * Macro compares two strings for equality ignoring case, length limited
+ */
+#define strncaseeq(x,y,len) (strncasecmp(x, y, len) == 0)
+
 /**
  * Macro compares two binary blobs for equality
  */