mirror of
https://github.com/samba-team/samba.git
synced 2025-12-03 04:23:50 +03:00
r13278: remove a silly strcasecmp() replacement
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
70ad98b051
commit
6ec71ffbc1
@@ -59,15 +59,7 @@ char *ldb_casefold(void *mem_ctx, const char *s)
|
|||||||
*/
|
*/
|
||||||
int ldb_caseless_cmp(const char *s1, const char *s2)
|
int ldb_caseless_cmp(const char *s1, const char *s2)
|
||||||
{
|
{
|
||||||
int i;
|
return strcasecmp(s1, s2);
|
||||||
for (i=0;s1[i] != 0;i++) {
|
|
||||||
int c1 = toupper((unsigned char)s1[i]),
|
|
||||||
c2 = toupper((unsigned char)s2[i]);
|
|
||||||
if (c1 != c2) {
|
|
||||||
return c1 - c2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return s2[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user