From patchwork Tue May 10 01:26:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tobin C. Harding" X-Patchwork-Id: 620401 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3r3hSb0fGxz9t7M for ; Tue, 10 May 2016 11:27:27 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=tobin.cc header.i=@tobin.cc header.b=lxhCW1WM; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b=TdWUmxl9; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754130AbcEJB1R (ORCPT ); Mon, 9 May 2016 21:27:17 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:41529 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754085AbcEJB1P (ORCPT ); Mon, 9 May 2016 21:27:15 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id ADC32201AB for ; Mon, 9 May 2016 21:27:14 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Mon, 09 May 2016 21:27:14 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=tobin.cc; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=GPIszLuxlQapx2JJkE1ujeK2eRA =; b=lxhCW1WMZv4iB/DSWhNsM9i9Tmgm0Oz6MUdWnC+7jeqpSyHzWdoc5L47RmL txFS6wByIU41obQbysP6beK8gLr96UZPw+bz8LPf3zDEsZ/PK3y97EX/gBQa0DTO ZjePmBmOUCRqFqOEgFaUcmb8wfs70NRfct64vxLKzTvaAymg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=GPIs zLuxlQapx2JJkE1ujeK2eRA=; b=TdWUmxl98hJTcytcoAFg/2CvdUxd13gZPi1I uEm/zWc9cl1uqBtd4odQqWmU+dzn1FTW4wIz8EOCFnsJWAgJCwS+m4Nu0ExPWqd0 etLIsNpp7qjRjGCRGiH82x4WlpOB8HbG8i1COOWWeG4ywtzV0tklRlzv2+4+l2Um jf3LvSA= X-Sasl-enc: i7NLXU/d3+YJri91c0sZo0fTD9NISBFUhPkyLs97uDYz 1462843633 Received: from eros.local (ppp121-44-147-72.lns20.syd7.internode.on.net [121.44.147.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 22093680170; Mon, 9 May 2016 21:27:11 -0400 (EDT) From: tcharding To: Stephen Hemminger Cc: Tobin C Harding , Pablo Neira Ayuso , "David S. Miller" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org Subject: [PATCH 3/3] bridge: netfilter: checkpatch null comparison fixes Date: Tue, 10 May 2016 11:26:58 +1000 Message-Id: <1462843618-21914-4-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1462843618-21914-1-git-send-email-me@tobin.cc> References: <1462843618-21914-1-git-send-email-me@tobin.cc> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org From: Tobin C Harding checkpatch produces comparison to null 'checks'. This patch amends them. Signed-off-by: Tobin C Harding --- net/bridge/netfilter/ebt_stp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bridge/netfilter/ebt_stp.c b/net/bridge/netfilter/ebt_stp.c index 9df943f..677904f 100644 --- a/net/bridge/netfilter/ebt_stp.c +++ b/net/bridge/netfilter/ebt_stp.c @@ -128,7 +128,7 @@ ebt_stp_mt(const struct sk_buff *skb, struct xt_action_param *par) const u8 header[6] = {0x42, 0x42, 0x03, 0x00, 0x00, 0x00}; sp = skb_header_pointer(skb, 0, sizeof(_stph), &_stph); - if (sp == NULL) + if (!sp) return false; /* The stp code only considers these */ @@ -146,7 +146,7 @@ ebt_stp_mt(const struct sk_buff *skb, struct xt_action_param *par) st = skb_header_pointer(skb, sizeof(_stph), sizeof(_stpc), &_stpc); - if (st == NULL) + if (!st) return false; return ebt_filter_config(info, st); }