Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: Remove unnecessary conversion to bool

Here we could use the '!=' expression to fix the following coccicheck
warning:

./net/netfilter/xt_nfacct.c:30:41-46: WARNING: conversion to bool not needed here

Reported-by: Tosk Robot <tencent_os_robot@tencent.com>
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Kaixu Xia and committed by
Pablo Neira Ayuso
0ef083d5 988187e8

+1 -1
+1 -1
net/netfilter/xt_nfacct.c
··· 27 27 28 28 overquota = nfnl_acct_overquota(xt_net(par), info->nfacct); 29 29 30 - return overquota == NFACCT_UNDERQUOTA ? false : true; 30 + return overquota != NFACCT_UNDERQUOTA; 31 31 } 32 32 33 33 static int