mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +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:
committed by
Carlos R. Mafra
parent
49db946aa2
commit
090b761fde
@@ -139,15 +139,11 @@ RImage *RLoadJPEG(const char *file_name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
buffer[0] = (JSAMPROW) malloc(cinfo.image_width * cinfo.num_components);
|
buffer[0] = (JSAMPROW) malloc(cinfo.image_width * cinfo.num_components);
|
||||||
|
|
||||||
if (!buffer[0]) {
|
if (!buffer[0]) {
|
||||||
RErrorCode = RERR_NOMEMORY;
|
RErrorCode = RERR_NOMEMORY;
|
||||||
jpeg_destroy_decompress(&cinfo);
|
jpeg_destroy_decompress(&cinfo);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
if (buffer[0])
|
return NULL;
|
||||||
free(buffer[0]);
|
|
||||||
|
|
||||||
return image;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cinfo.jpeg_color_space == JCS_GRAYSCALE) {
|
if (cinfo.jpeg_color_space == JCS_GRAYSCALE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user