On Sun, 18 May 2014 14:54:22 +0100 "Carlos R. Mafra" <[email protected]> wrote:
> On Sun, 18 May 2014 at 13:32:48 +0200, Amadeusz Sławiński wrote: > > Signed-off-by: Amadeusz Sławiński <[email protected]> > > --- > > WINGs/wfilepanel.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/WINGs/wfilepanel.c b/WINGs/wfilepanel.c > > index 0f12819..968dcc4 100644 > > --- a/WINGs/wfilepanel.c > > +++ b/WINGs/wfilepanel.c > > @@ -664,7 +664,6 @@ static void normalizePath(char *s) > > { > > int i, j, found; > > > > - found = 0; > > for (i = 0; s[i]; (void)(!found && i++)) { > > found = 0; > > if (s[i] == '/' && s[i+1] == '/') { > > I'm tempted to let the assigment in place. The intention > is clearer and I'm a bit confused about what the first value > of !found would be. Yes, this may be compiler specific. > On the other hand, what's the downside of removing 'found' > altogether from the loop? > > As I read, it's there to look again in same place for "//" so it would catch something like "////" in string. Though nslash, seems to be used to count consecutive ones and then they are removed. So yes, it should be ok, to remove this. Skip this patch then and I will take another look. Amadeusz -- To unsubscribe, send mail to [email protected].
