
6 Jan
2012
6 Jan
'12
12:25 a.m.
Dear Mike Frysinger,
In message 201201051821.35774.vapier@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: wd@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.