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:
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);
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user