svn commit: samba r13336 - in branches/SAMBA_4_0/source/lib: .

idra at samba.org idra at samba.org
Sat Feb 4 08:55:35 GMT 2006


Author: idra
Date: 2006-02-04 08:55:35 +0000 (Sat, 04 Feb 2006)
New Revision: 13336

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

Log:

Doh! We actually never optimized for the ascii case.
In the 3.0 branches it is fixed this but we missed it for samba4


Modified:
   branches/SAMBA_4_0/source/lib/util_str.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/util_str.c
===================================================================
--- branches/SAMBA_4_0/source/lib/util_str.c	2006-02-04 07:57:57 UTC (rev 13335)
+++ branches/SAMBA_4_0/source/lib/util_str.c	2006-02-04 08:55:35 UTC (rev 13336)
@@ -796,7 +796,7 @@
 	   fast. We optimise for the ascii case, knowing that all our
 	   supported multi-byte character sets are ascii-compatible
 	   (ie. they match for the first 128 chars) */
-	while (*s && !(((uint8_t)s[0]) & 0x7F)) {
+	while (*s && !(((uint8_t)*s) & 0x80)) {
 		*s = tolower((uint8_t)*s);
 		s++;
 	}
@@ -832,7 +832,7 @@
 	   fast. We optimise for the ascii case, knowing that all our
 	   supported multi-byte character sets are ascii-compatible
 	   (ie. they match for the first 128 chars) */
-	while (*s && !(((uint8_t)s[0]) & 0x7F)) {
+	while (*s && !(((uint8_t)*s) & 0x80)) {
 		*s = toupper((uint8_t)*s);
 		s++;
 	}
@@ -870,7 +870,7 @@
 		return 0;
 	}
 
-	while (*s && !(((uint8_t)s[0]) & 0x7F)) {
+	while (*s && !(((uint8_t)*s) & 0x80)) {
 		s++;
 		count++;
 	}



More information about the samba-cvs mailing list