diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-11-16 11:11:30 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:28:18 -0500 |
commit | 982f7f9b443d6ecaddcbb2e3f79029aced06fdd0 (patch) | |
tree | 47d713332e40ac3e4b5b8fcddd5066b6d06e239a /source4 | |
parent | ab7411714b7cceba3c551dccfd0d775b8332f1b4 (diff) | |
download | samba-982f7f9b443d6ecaddcbb2e3f79029aced06fdd0.tar.gz samba-982f7f9b443d6ecaddcbb2e3f79029aced06fdd0.tar.bz2 samba-982f7f9b443d6ecaddcbb2e3f79029aced06fdd0.zip |
r19742: fix compiler warnings
metze
(This used to be commit 4edeef56dcd185869812bf622c5b496360eb6223)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ldb/common/attrib_handlers.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/lib/ldb/common/attrib_handlers.c b/source4/lib/ldb/common/attrib_handlers.c index 07a0ec6eb8..cb1dfa105f 100644 --- a/source4/lib/ldb/common/attrib_handlers.c +++ b/source4/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 */ |