svn commit: samba r16554 - in branches/SAMBA_3_0/source/lib: .

jra at samba.org jra at samba.org
Tue Jun 27 03:59:34 GMT 2006


Author: jra
Date: 2006-06-27 03:59:34 +0000 (Tue, 27 Jun 2006)
New Revision: 16554

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

Log:
Sorry, just had to change this. Don't use int when
you're passing a BOOL parameter, don't use "clever"
code in while statement - make things easier and
clearer to understand when triggering something
with an if.
Jeremy.

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


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util_str.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_str.c	2006-06-27 03:07:37 UTC (rev 16553)
+++ branches/SAMBA_3_0/source/lib/util_str.c	2006-06-27 03:59:34 UTC (rev 16554)
@@ -40,7 +40,7 @@
                                 char *buff,
                                 const char *sep,
                                 size_t bufsize,
-                                int ltrim)
+                                BOOL ltrim)
 {
 	char *s;
 	char *pbuf;
@@ -57,8 +57,10 @@
 		sep = " \t\n\r";
 
 	/* find the first non sep char, if left-trimming is requested */
-	while (ltrim && *s && strchr_m(sep,*s))
-		s++;
+	if (ltrim) {
+		while (*s && strchr_m(sep,*s))
+			s++;
+	}
 	
 	/* nothing left? */
 	if (! *s)



More information about the samba-cvs mailing list