charset: Remove unused strcmp_w()
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Feb 2012 01:46:38 +0000 (12:46 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 10 Feb 2012 05:45:13 +0000 (16:45 +1100)
Found by callcatcher.

Found by callcatcher: http://www.skynet.ie/~caolan/Packages/callcatcher.html

Andrew Bartlett

lib/util/charset/charset.h
lib/util/charset/util_unistr_w.c

index a2c4a82a736e8fed4ee75c6fc9f8df4e5eba85ae..e4297e4f3ce92814c324e4635e13a3ca5641e788 100644 (file)
@@ -236,7 +236,6 @@ smb_ucs2_t *strnrchr_w(const smb_ucs2_t *s, smb_ucs2_t c, unsigned int n);
 smb_ucs2_t *strstr_w(const smb_ucs2_t *s, const smb_ucs2_t *ins);
 bool strlower_w(smb_ucs2_t *s);
 bool strupper_w(smb_ucs2_t *s);
-int strcmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
 int strcasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b);
 int strncasecmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len);
 int strcmp_wa(const smb_ucs2_t *a, const char *b);
index 72bd19855c672e02b775ffc97bd7f5d2b4194009..52252676bb219a8f7e2fc91f1b475dac0f510893 100644 (file)
@@ -207,20 +207,6 @@ bool strupper_w(smb_ucs2_t *s)
        return ret;
 }
 
-int strcmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b)
-{
-       smb_ucs2_t cpa, cpb;
-
-       while ((*(COPY_UCS2_CHAR(&cpb,b))) && (*(COPY_UCS2_CHAR(&cpa,a)) == cpb)) {
-               a++;
-               b++;
-       }
-       return (*(COPY_UCS2_CHAR(&cpa,a)) - *(COPY_UCS2_CHAR(&cpb,b)));
-       /* warning: if *a != *b and both are not 0 we return a random
-               greater or lesser than 0 number not realted to which
-               string is longer */
-}
-
 static int strncmp_w(const smb_ucs2_t *a, const smb_ucs2_t *b, size_t len)
 {
        smb_ucs2_t cpa, cpb;