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 | 18171cf54b22f9f2d73753db580934bd10e95e3d (patch) | |
tree | bb9feb0b52822b2e73018b6ed8e25ef4755aac25 | |
parent | b7965ac26cbfdfe60f929e2fa3a295b8c57d220d (diff) | |
download | samba-18171cf54b22f9f2d73753db580934bd10e95e3d.tar.gz samba-18171cf54b22f9f2d73753db580934bd10e95e3d.tar.xz samba-18171cf54b22f9f2d73753db580934bd10e95e3d.zip |
r19741: fix compiler warnings
metze
-rw-r--r-- | source/lib/ldb/common/attrib_handlers.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/lib/ldb/common/attrib_handlers.c b/source/lib/ldb/common/attrib_handlers.c index 07a0ec6eb88..cb1dfa105f0 100644 --- a/source/lib/ldb/common/attrib_handlers.c +++ b/source/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 */ |