Blame SOURCES/nfnl_osf-Drop-pointless-check-in-xt_osf_strchr.patch

43df5c
From 4103f34690e1380c0ad4831b80ad913ea980eab4 Mon Sep 17 00:00:00 2001
43df5c
From: Phil Sutter <psutter@redhat.com>
43df5c
Date: Fri, 15 Mar 2019 17:51:28 +0100
43df5c
Subject: [PATCH] nfnl_osf: Drop pointless check in xt_osf_strchr()
43df5c
43df5c
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1525980
43df5c
Upstream Status: iptables commit 8c786a351a441
43df5c
43df5c
commit 8c786a351a441ff23ad5d9d1da8cec492f88f542
43df5c
Author: Phil Sutter <phil@nwl.cc>
43df5c
Date:   Wed Sep 19 15:16:42 2018 +0200
43df5c
43df5c
    nfnl_osf: Drop pointless check in xt_osf_strchr()
43df5c
43df5c
    Although it remains unclear what the original intention behind the
43df5c
    affected code was, but 'tmp + 1' always evaluates true since 'tmp' is a
43df5c
    pointer value.
43df5c
43df5c
    Cc: Evgeniy Polyakov <johnpol@2ka.mxt.ru>
43df5c
    Signed-off-by: Phil Sutter <phil@nwl.cc>
43df5c
    Signed-off-by: Florian Westphal <fw@strlen.de>
43df5c
43df5c
Signed-off-by: Phil Sutter <psutter@redhat.com>
43df5c
---
43df5c
 utils/nfnl_osf.c | 2 +-
43df5c
 1 file changed, 1 insertion(+), 1 deletion(-)
43df5c
43df5c
diff --git a/utils/nfnl_osf.c b/utils/nfnl_osf.c
43df5c
index 0f8b35b805016..9a9fbe1268155 100644
43df5c
--- a/utils/nfnl_osf.c
43df5c
+++ b/utils/nfnl_osf.c
43df5c
@@ -141,7 +141,7 @@ static char *xt_osf_strchr(char *ptr, char c)
43df5c
 	if (tmp)
43df5c
 		*tmp = '\0';
43df5c
 
43df5c
-	while (tmp && tmp + 1 && isspace(*(tmp + 1)))
43df5c
+	while (tmp && isspace(*(tmp + 1)))
43df5c
 		tmp++;
43df5c
 
43df5c
 	return tmp;
43df5c
-- 
43df5c
2.21.0
43df5c