On Thursday 05 January 2012 18:25:06 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > > + if ((s == NULL) ||
> > > +         ((new = malloc (len + 1)) == NULL) ) {
> > > +         return NULL;
> > > + }
> > 
> > please split this up such as:
> 
> I'm OK with the splitting, but...
> 
> >     if (s == NULL)
> >             return s;
> >     
> >     new = malloc(len + 1);
> >     if (new == NULL)
> >             return new;
> 
> ... in both cases, a "return NULL" is much easier to parse for the
> human and identical for the compiler, so that should be used.

sure, np
-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