From: Phil Sutter Date: Wed, 19 Sep 2018 13:16:42 +0000 (+0200) Subject: nfnl_osf: Drop pointless check in xt_osf_strchr() X-Git-Tag: v1.8.1~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c786a351a441ff23ad5d9d1da8cec492f88f542;p=thirdparty%2Fiptables.git nfnl_osf: Drop pointless check in xt_osf_strchr() 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 Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- diff --git a/utils/nfnl_osf.c b/utils/nfnl_osf.c index 720e3a38..e65c3201 100644 --- a/utils/nfnl_osf.c +++ b/utils/nfnl_osf.c @@ -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;