On Wed, 16 Jul 2014 12:00:42 +0200 Markus Teich <markus.te...@stusta.mhn.de> 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 <d...@frign.de>