summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-27 03:59:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:00 -0500
commitb000e8f08312717c123bdc800fffee0347f53d5b (patch)
tree058caf102c5d2692034ba1827b36a70968835dd4
parent9220a7bb7ba0468113deae3c033504ab4ff31eb2 (diff)
downloadsamba-b000e8f08312717c123bdc800fffee0347f53d5b.tar.gz
samba-b000e8f08312717c123bdc800fffee0347f53d5b.tar.bz2
samba-b000e8f08312717c123bdc800fffee0347f53d5b.zip
r16554: 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. (This used to be commit b1fc2d8b99e0402c0e8fe954d9f9563dc4dc2812)
-rw-r--r--source3/lib/util_str.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index 0248ad63ad..8e0f2765eb 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -40,7 +40,7 @@ static BOOL next_token_internal(const char **ptr,
char *buff,
const char *sep,
size_t bufsize,
- int ltrim)
+ BOOL ltrim)
{
char *s;
char *pbuf;
@@ -57,8 +57,10 @@ static BOOL next_token_internal(const char **ptr,
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)