[iptables PATCH 01/28] nfnl_osf: Drop pointless check in xt_osf_strchr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Signed-off-by: Phil Sutter <phil@xxxxxx>
---
 utils/nfnl_osf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/nfnl_osf.c b/utils/nfnl_osf.c
index 720e3a38dbd36..e65c320156518 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;
-- 
2.18.0




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux