From b000e8f08312717c123bdc800fffee0347f53d5b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 27 Jun 2006 03:59:34 +0000 Subject: 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) --- source3/lib/util_str.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source3') 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) -- cgit