diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-11-16 11:11:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:52 -0500 |
commit | 5a77ccfbfc070ccb77004cb47e2a582883e4862c (patch) | |
tree | ee8013a39beb699e4f905e64d9fc5529b7d080e6 | |
parent | 0fa75c6797ce70502aa0051dc70c69de424f7ccb (diff) | |
download | samba-5a77ccfbfc070ccb77004cb47e2a582883e4862c.tar.gz samba-5a77ccfbfc070ccb77004cb47e2a582883e4862c.tar.bz2 samba-5a77ccfbfc070ccb77004cb47e2a582883e4862c.zip |
r19741: fix compiler warnings
metze
(This used to be commit 18171cf54b22f9f2d73753db580934bd10e95e3d)
-rw-r--r-- | source3/lib/ldb/common/attrib_handlers.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/lib/ldb/common/attrib_handlers.c b/source3/lib/ldb/common/attrib_handlers.c index 07a0ec6eb8..cb1dfa105f 100644 --- a/source3/lib/ldb/common/attrib_handlers.c +++ b/source3/lib/ldb/common/attrib_handlers.c @@ -154,7 +154,8 @@ static int ldb_comparison_fold(struct ldb_context *ldb, void *mem_ctx, const struct ldb_val *v1, const struct ldb_val *v2) { const char *s1=(const char *)v1->data, *s2=(const char *)v2->data; - char *b1, *b2, *u1, *u2; + const char *u1, *u2; + char *b1, *b2; int ret; while (*s1 == ' ') s1++; while (*s2 == ' ') s2++; @@ -185,11 +186,14 @@ static int ldb_comparison_fold(struct ldb_context *ldb, void *mem_ctx, utf8str: /* no need to recheck from the start, just from the first utf8 char found */ - b1 = u1 = ldb_casefold(ldb, mem_ctx, s1); - b2 = u2 = ldb_casefold(ldb, mem_ctx, s2); + b1 = ldb_casefold(ldb, mem_ctx, s1); + b2 = ldb_casefold(ldb, mem_ctx, s2); - if (u1 && u2) { + if (b1 && b2) { /* Both strings converted correctly */ + + u1 = b1; + u2 = b2; } else { /* One of the strings was not UTF8, so we have no options but to do a binary compare */ |