Re: [dev] Looking for simple, alpha supporting image format

From: FRIGN <dev_AT_frign.de>
Date: Wed, 16 Jul 2014 12:58:13 +0200

On Wed, 16 Jul 2014 12:00:42 +0200
Markus Teich <markus.teich_AT_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 <dev_AT_frign.de>
Received on Wed Jul 16 2014 - 12:58:13 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 16 2014 - 13:00:12 CEST