From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: [patch 1/3] Fix return values for LOG and ULOG Date: Fri, 26 Jan 2007 15:03:57 +0100 Message-ID: <45BA0A4D.5020609@trash.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Netfilter Developer Mailing List 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: > [PATCH 1/3] Fix return values for LOG and ULOG > > Signed-off-by: Jan Engelhardt , 2007-01-17 > > Index: linux-2.6.20-rc6/net/ipv4/netfilter/ipt_LOG.c > =================================================================== > --- linux-2.6.20-rc6.orig/net/ipv4/netfilter/ipt_LOG.c > +++ linux-2.6.20-rc6/net/ipv4/netfilter/ipt_LOG.c > @@ -471,8 +471,9 @@ static struct nf_logger ipt_log_logger = > > static int __init ipt_log_init(void) > { > - if (ipt_register_target(&ipt_log_reg)) > - return -EINVAL; > + int ret; > + if ((ret = ipt_register_target(&ipt_log_reg)) < 0) > + return ret; I've changed this to ret = ... if (ret < 0) ... since this is the prefered style. Thanks Jan.