From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751534AbdDANGG (ORCPT ); Sat, 1 Apr 2017 09:06:06 -0400 Received: from smtprelay0153.hostedemail.com ([216.40.44.153]:55807 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751259AbdDANGE (ORCPT ); Sat, 1 Apr 2017 09:06:04 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:2902:3138:3139:3140:3141:3142:3350:3622:3865:3866:3867:3868:4321:5007:10004:10400:10848:11232:11658:11914:12043:12296:12679:12740:12760:12895:13069:13311:13357:13439:14659:14721:21060:21080:21451:30034:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: bat72_8bda55cbccf4f X-Filterd-Recvd-Size: 1730 Message-ID: <1491051959.27353.40.camel@perches.com> Subject: Re: [PATCH] ipv4: netfilter: Comparison to NULL could be written From: Joe Perches To: Arushi Singhal , pablo@netfilter.org Cc: Jozsef Kadlecsik , "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 01 Apr 2017 06:05:59 -0700 In-Reply-To: <20170401083520.GA2037@arushi-HP-Pavilion-Notebook> References: <20170401083520.GA2037@arushi-HP-Pavilion-Notebook> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2017-04-01 at 14:05 +0530, Arushi Singhal wrote: > Fixed coding style for null comparisons to be more > consistant with the rest of the kernel coding style. typo: consistent and trivia: > diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c [] > @@ -653,7 +653,7 @@ static struct xt_counters *alloc_counters(const struct xt_table *table) > countersize = sizeof(struct xt_counters) * private->number; > counters = vzalloc(countersize); > > - if (counters == NULL) > + if (!counters) > return ERR_PTR(-ENOMEM); This could also remove the blank link above the test.