From: Karel Zak Date: Wed, 18 Jul 2018 07:46:40 +0000 (+0200) Subject: lib/strutils: remove redundant condition X-Git-Tag: v2.33-rc1~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8deb816173187ce0666c1daa37ec35e4b7026b98;p=thirdparty%2Futil-linux.git lib/strutils: remove redundant condition [util-linux-2.32.1/lib/strutils.c:122]: (style) Redundant condition: If 'EXPR == '0'', the comparison 'EXPR' is always true. Reported-by: David Binderman Signed-off-by: Karel Zak --- diff --git a/lib/strutils.c b/lib/strutils.c index c3c4222165..38fc8d6b5c 100644 --- a/lib/strutils.c +++ b/lib/strutils.c @@ -119,7 +119,7 @@ check_suffix: if (frac == 0 && *p && dp && strncmp(dp, p, dpsz) == 0) { char *fstr = p + dpsz; - for (p = fstr; *p && *p == '0'; p++) + for (p = fstr; *p == '0'; p++) frac_zeros++; errno = 0, p = NULL; frac = strtoumax(fstr, &p, 0);