From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: xt_gateway 20070605 (kernel) Date: Tue, 05 Jun 2007 17:15:31 +0200 Message-ID: <46657E13.50106@trash.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Netfilter Developer Mailing List , Amin Azez To: Jan Engelhardt Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Jan Engelhardt wrote: > (Style changes the way Patrick prefers it.) > > + if ((dst = skb->dst) == NULL) > + return false; > + if ((neigh = dst->neighbour) == NULL) > + return false; Actually I very much prefer to have assignments seperated from comparisons, there just were no instances of this in the patches I commented on :) Most of the checks here are unnecessary anyway (we always have a skb with skb->dst != NULL, neigh->tbl is always != NULL and the neighbour table family is always AF_INET since the match is only registered for AF_INET.