summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-21 01:42:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:54 -0500
commit1ec841d33e035f11ec12edbce52eab1c559d32e6 (patch)
treef85e2ef0edb9d70b4d54f560cded76d4bac0f341
parent65c3b46d0222df9c1bb49416a632913b4906b391 (diff)
downloadsamba-1ec841d33e035f11ec12edbce52eab1c559d32e6.tar.gz
samba-1ec841d33e035f11ec12edbce52eab1c559d32e6.tar.bz2
samba-1ec841d33e035f11ec12edbce52eab1c559d32e6.zip
r2454: fixed the accelerated StrCaseCmp() so it compares in the right order
(This used to be commit 4b795cbf12108e56e5e84e3073c24ce6b625e3c3)
-rw-r--r--source4/lib/util_str.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index 3fe6fd1cc0..faa8690849 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -148,14 +148,14 @@ int StrCaseCmp(const char *s1, const char *s2)
char u1 = toupper(*s1);
char u2 = toupper(*s2);
if (u1 != u2) {
- return u2 - u1;
+ return u1 - u2;
}
s1++;
s2++;
}
if (*s1 == 0 || *s2 == 0) {
- return *s2 - *s1;
+ return *s1 - *s2;
}
return StrCaseCmp_slow(s1, s2);