Re: Update ip command line processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 20, 2007 at 03:21:21PM -0800, David Miller wrote:
> From: Simon Horman <[email protected]>
> Date: Tue, 18 Dec 2007 17:57:32 +0900
> 
> > @@ -1414,9 +1414,16 @@ late_initcall(ip_auto_config);
> >   */
> >  static int __init ic_proto_name(char *name)
> >  {
> > +	if (!name) {
> > +		return 1;
> > +	}
> 
> I do not see any circumstance under which this pointer can
> be NULL.  Judging by your other changes, I think you mean
> to use "!*name" here.
> 
> Maybe:
> 
> 	if (*name == '\0')
> 
> would make it clearer what you're checking for, an
> empty string.
> 
> Otherwise I'm fine with your change.

Sorry, I meant if (*name == '\0') as you suggest to replace the first
portion of:

-	ic_enable = (*addrs &&
-		(strcmp(addrs, "off") != 0) &&
-		(strcmp(addrs, "none") != 0));

I'll send an updated patch shortly.

-- 
Horms

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux