On Monday, September 12, 2011 01:08:50 Marek Vasut wrote:
> On Monday, September 12, 2011 06:49:53 AM Mike Frysinger wrote:
> > --- a/net/eth.c
> > +++ b/net/eth.c
> > 
> > -   size_t len = strlen(dev->name);
> > -   if (len >= NAMESIZE) {
> > -           printf("Network driver name is too long (%zu >= %zu): %s\n",
> > -                                           len, NAMESIZE, dev->name);
> > -           return -1;
> > -   }
> > +   assert(strlen(dev->name) < NAMESIZE);
> 
> Aren't you changing the logic here ?

pretty sure it's the same.  old code would warn when "len >= max", while mine 
asserts that "len < max" and thus aborts when "!(len < max)" and based on 
boolean logic, "(x >= y) == !(x < y)".
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to