]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
nfnl_osf: Drop pointless check in xt_osf_strchr()
authorPhil Sutter <phil@nwl.cc>
Wed, 19 Sep 2018 13:16:42 +0000 (15:16 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 24 Sep 2018 09:23:37 +0000 (11:23 +0200)
Although it remains unclear what the original intention behind the
affected code was, but 'tmp + 1' always evaluates true since 'tmp' is a
pointer value.

Cc: Evgeniy Polyakov <johnpol@2ka.mxt.ru>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
utils/nfnl_osf.c

index 720e3a38dbd360f3ddca6c5a8d22a5d0ff4edb31..e65c320156518b6c13bc7a7162453e55595a83ea 100644 (file)
@@ -141,7 +141,7 @@ static char *xt_osf_strchr(char *ptr, char c)
        if (tmp)
                *tmp = '\0';
 
-       while (tmp && tmp + 1 && isspace(*(tmp + 1)))
+       while (tmp && isspace(*(tmp + 1)))
                tmp++;
 
        return tmp;