On Wed, 16 Jul 2014 12:00:42 +0200
Markus Teich <[email protected]> wrote:

> You can combine these, since free(NULL) does nothing.
> 
>       if (!(data = malloc(len)) || read(fd, data, len) != len) {
>               free(data);
>               return NULL;
>       }

Cf. my version ;)
I love idiomatic C-code :D.

Cheers

FRIGN

-- 
FRIGN <[email protected]>

Reply via email to