Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1098083pxb; Fri, 6 Nov 2020 00:24:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnxsJtVZU7Bgh0kIuPt4n2q5tCeTFvsWaxGY6pXzWPcflfg1dxgXhSJsDnl/BsZl6CBZFu X-Received: by 2002:a17:906:4dc2:: with SMTP id f2mr936098ejw.446.1604651072768; Fri, 06 Nov 2020 00:24:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604651072; cv=none; d=google.com; s=arc-20160816; b=pzYUPmeR+Sw8QXIh+GdzUrT4iVo99Q7TQDGrP99ovgdUBBsc/H1TnLAGnOj5wEa0Rz ALTxzy3wkl4g6YCOB95XhhKDjbBSvWRsrIkRqfxc/veAufodakaS57Ge3JINg5jAMOEk dhdNItEkvol88IRDBIOTt+IrITWW2B6XeVddnF94HxfXJuG5hWw/i+c2+MOeZrcAgB/8 AJB1CXGqNSDX8SpfdWP7ZkrGVre6jPk585g28AySnij6AMYhfRTAsi1O2e9SOt11pFgx I+eUAVSBMh5CLhTiwfhw2/A/URJ1+esuErSFAB7NkbQIuMD3AEVPcKJxcXlsD2FI5FG7 siWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=f2B4u15lC2Ii8tq/d8kCTsZtVNP3WmCeuq2bZvx3ex0=; b=NK2IUkLXy4skXXFrZvVC80jNrieJ9iJx8MagIEVWj8+pX7B4OgiaqMVln7u+oGb9SI +fb6yz6GFnAABFvfEY6gdVl9mQZw64PFkNY0gbnASiTPURWjH/ylq8itx/YDVZ49xveb 2HR837oll7PlVWmkmRFXs8ZDVUZyRFnHofj6fNA+xxIFGtpj9EuwbIK8YMM8j7KO8Jgn XAvRJ5HKQf5Cv5DopsWVFKO7EY/nwuHf4lpR9hr04ipPq7hKMvUcTD98M/+wQaZDmyxM bAM34nUX5hE6O/xlAs2WhXite0BhmAf2m2/2CTyqUh5AipUl1P2Yuqqr4/6qR5sgzkbm iBaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vaPz8WGl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r24si421730edi.480.2020.11.06.00.24.09; Fri, 06 Nov 2020 00:24:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vaPz8WGl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726494AbgKFIUT (ORCPT + 99 others); Fri, 6 Nov 2020 03:20:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgKFIUT (ORCPT ); Fri, 6 Nov 2020 03:20:19 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35704C0613CF; Fri, 6 Nov 2020 00:20:19 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id v12so602841pfm.13; Fri, 06 Nov 2020 00:20:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=f2B4u15lC2Ii8tq/d8kCTsZtVNP3WmCeuq2bZvx3ex0=; b=vaPz8WGlio/V0T7a0R81qmZoIkZpylBBNoCVbgjXNYSAAtFYVSfPZW/1aCza+xy3Qq Z3lOeF68roT/EEpuMSAcSFTocyXuW98Cmr1PL+fTK9ZERXdSxu3FORYit5DfDwS2ZxNl dUFd7gs+Mn5q/KaCu+Fw7quVHVCvbgmS4gyp7Lro3Qi6WbjVO2xbHIyoCV39JKwuOG6Y aKQKlFPWTTcm6qmsFfBl9o0N0KK5lOI4S3H0V9hoYF2/CS5MD1GoyqTIAS++C2SFfyBT FWelGYdeNFm8vgQCPf/JCiJKi9Z/WEfF1aPm0nTi4igTxYOtHXDh2BxwCiQF94IBNvYA Hrfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=f2B4u15lC2Ii8tq/d8kCTsZtVNP3WmCeuq2bZvx3ex0=; b=ghBzkn6BIBEQtliH3i83Eow2owZ2IJWi4jiINzvOMerqoIcYoKxrEcDkhygO1x7i4o NHGVJeoejwNQ2BBzEUEuZaxzATAy8VVMACn45cAfzHVdG5m/Geg3jEVAJL/mn0L0Y2fH cb49fJ4V5po/fwcNuAgm/ww43C/TwKnRluTe+NaY4xysx3ZA/FcPekgTWYAutIVXGy7c VSdRh2P8jl4I81gkgKH79Are4tOlAbRtkmyRXK6e4pEhaShYUGG6cSvItZbML90ZLMuh OGlQoEeuXkd9uQb3PxwAHIsIcJMkw0mB+74QjWhbVoYeyZTcbdq4X/sU//8E52c/fHYq ppZQ== X-Gm-Message-State: AOAM532yRqLvbfPbvkwnJ71YAKBPkhb+9/ARlabyKjnYDaf713fy3JHF lI9O68ZVbsuMj1AjFJafLY5c//aL66N9 X-Received: by 2002:a63:3041:: with SMTP id w62mr852183pgw.166.1604650818861; Fri, 06 Nov 2020 00:20:18 -0800 (PST) Received: from he-cluster.localdomain (67.216.221.250.16clouds.com. [67.216.221.250]) by smtp.gmail.com with ESMTPSA id d7sm896697pgh.17.2020.11.06.00.20.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Nov 2020 00:20:18 -0800 (PST) From: xiakaixu1987@gmail.com X-Google-Original-From: kaixuxia@tencent.com To: pablo@netfilter.org, kadlec@netfilter.org, fw@strlen.de Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org, Kaixu Xia Subject: [PATCH] netfilter: Remove unnecessary conversion to bool Date: Fri, 6 Nov 2020 16:20:13 +0800 Message-Id: <1604650813-1132-1-git-send-email-kaixuxia@tencent.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kaixu Xia 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 Signed-off-by: Kaixu Xia --- net/netfilter/xt_nfacct.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/xt_nfacct.c b/net/netfilter/xt_nfacct.c index a97c2259bbc8..7c6bf1c16813 100644 --- a/net/netfilter/xt_nfacct.c +++ b/net/netfilter/xt_nfacct.c @@ -27,7 +27,7 @@ static bool nfacct_mt(const struct sk_buff *skb, struct xt_action_param *par) overquota = nfnl_acct_overquota(xt_net(par), info->nfacct); - return overquota == NFACCT_UNDERQUOTA ? false : true; + return overquota != NFACCT_UNDERQUOTA; } static int -- 2.20.0