1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

load_jpeg.c Removed dead code

This patch removes the code not used. Because the if block
check that buffer[0] is NULL, then, we don't need check it
again inside.

Image is not used yet, so is NULL. We can return NULL.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This commit is contained in:
Rodolfo García Peñas (kix)
2019-06-20 00:40:10 +02:00
committed by Carlos R. Mafra
parent 49db946aa2
commit 090b761fde

View File

@@ -139,15 +139,11 @@ RImage *RLoadJPEG(const char *file_name)
}
buffer[0] = (JSAMPROW) malloc(cinfo.image_width * cinfo.num_components);
if (!buffer[0]) {
RErrorCode = RERR_NOMEMORY;
jpeg_destroy_decompress(&cinfo);
fclose(file);
if (buffer[0])
free(buffer[0]);
return image;
return NULL;
}
if (cinfo.jpeg_color_space == JCS_GRAYSCALE) {