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

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