From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [patch] net: remove an unneeded check Date: Tue, 6 Aug 2013 15:04:42 +0300 Message-ID: <20130806120442.GR5051@mwanda> References: <20130729191519.GA11874@elgon.mountain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , "" , "" To: "Rustad, Mark D" Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:25312 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755449Ab3HFMFb (ORCPT ); Tue, 6 Aug 2013 08:05:31 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Aug 05, 2013 at 06:18:01PM +0000, Rustad, Mark D wrote: > On Jul 29, 2013, at 12:15 PM, Dan Carpenter wrote: > > > "ifa->ifa_label" is an array inside the in_ifaddr struct. It can never > > be NULL so we can remove this check. > > > > Signed-off-by: Dan Carpenter > > > > diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c > > index 8d48c39..1b7f7ae 100644 > > --- a/net/ipv4/devinet.c > > +++ b/net/ipv4/devinet.c > > @@ -1124,10 +1124,7 @@ static int inet_gifconf(struct net_device *dev, char __user *buf, int len) > > if (len < (int) sizeof(ifr)) > > break; > > memset(&ifr, 0, sizeof(struct ifreq)); > > - if (ifa->ifa_label) > > Is there any possibility that this was meant to check ifa->ifa_label[0]? It has been this way for almost 16 years and no one has complained. I should have put that into the changelog though, you are right. regards, dan carpenter