Heyho,

Charlie Murphy wrote:
> The X axis runs fastest.

You did not introduce the directions of x and y axis previously.

>               len = *w * *h * 4;

For readability I would leave the brackets.

        len = (*w) * (*h) * 4;

>               data = malloc(len);
>               if (!data)
>                       return NULL;
>               
>               if (read(fd, data, len) != len) {
>                       free(data);
>                       return NULL;
>               }

You can combine these, since free(NULL) does nothing.

        if (!(data = malloc(len)) || read(fd, data, len) != len) {
                free(data);
                return NULL;
        }

--Markus

Reply via email to