From 982f7f9b443d6ecaddcbb2e3f79029aced06fdd0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 16 Nov 2006 11:11:30 +0000 Subject: r19742: fix compiler warnings metze (This used to be commit 4edeef56dcd185869812bf622c5b496360eb6223) --- source4/lib/ldb/common/attrib_handlers.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source4/lib/ldb/common/attrib_handlers.c') 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 */ -- cgit