svn commit: samba r19742 - in branches/SAMBA_4_0/source/lib/ldb/common: .

metze at samba.org metze at samba.org
Thu Nov 16 11:11:31 GMT 2006


Author: metze
Date: 2006-11-16 11:11:30 +0000 (Thu, 16 Nov 2006)
New Revision: 19742

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19742

Log:
fix compiler warnings

metze
Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c	2006-11-16 11:11:09 UTC (rev 19741)
+++ branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c	2006-11-16 11:11:30 UTC (rev 19742)
@@ -154,7 +154,8 @@
 			       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 @@
 
 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 */
 



More information about the samba-cvs mailing list