Dear Mike Frysinger,

In message <201201051821.35774.vap...@gentoo.org> you 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.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Good morning. This is the telephone company. Due  to  repairs,  we're
giving  you  advance notice that your service will be cut off indefi-
nitely at ten o'clock. That's two minutes from now.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to