summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2018-03-31 20:44:45 -0700
committerNathan Chancellor <natechancellor@gmail.com>2018-04-02 12:35:57 -0700
commitffb6bfb300975b057f8451c88c1a3206b21020cc (patch)
treef0166cc2b52c8b29a52f53e2a37ba73ba936fc67 /net
parenta89da170dbe49ce3ae9a1800fc58bdc54f923ccc (diff)
ANDROID: xt_qtaguid: Remove unnecessary null checks to ifa_label
'ifa_label' will never be NULL since it isn't a plain pointer but an array of char values. ../net/netfilter/xt_qtaguid.c:971:11: warning: address of array 'ifa->ifa_label' will always evaluate to 'true' [-Wpointer-bool-conversion] ifa->ifa_label ? ifa->ifa_label : "(null)"); ~~~~~^~~~~~~~~ ~ ../net/netfilter/xt_qtaguid.c:972:13: warning: address of array 'ifa->ifa_label' will always evaluate to 'true' [-Wpointer-bool-conversion] if (ifa->ifa_label && !strcmp(ifname, ifa->ifa_label)) ~~~~~^~~~~~~~~ ~~ Change-Id: I3c87a5d4b830aaa21a59e9c39cfe0a1d60d7f830 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/xt_qtaguid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/xt_qtaguid.c b/net/netfilter/xt_qtaguid.c
index 148c2917285c..0711c7db765f 100644
--- a/net/netfilter/xt_qtaguid.c
+++ b/net/netfilter/xt_qtaguid.c
@@ -968,8 +968,8 @@ static void iface_stat_create(struct net_device *net_dev,
IF_DEBUG("qtaguid: iface_stat: create(%s): "
"ifa=%p ifa_label=%s\n",
ifname, ifa,
- ifa->ifa_label ? ifa->ifa_label : "(null)");
- if (ifa->ifa_label && !strcmp(ifname, ifa->ifa_label))
+ ifa->ifa_label);
+ if (!strcmp(ifname, ifa->ifa_label))
break;
}
}