mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Clean up some conditional compilation of parts of statements
and fixed some indentation
This commit is contained in:
13
pngset.c
13
pngset.c
@@ -524,13 +524,14 @@ png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr,
|
||||
}
|
||||
}
|
||||
|
||||
if ((num_palette > 0 && palette == NULL) ||
|
||||
(num_palette == 0
|
||||
# ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||
&& (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0
|
||||
# endif /* MNG_FEATURES */
|
||||
))
|
||||
#ifdef PNG_MNG_FEATURES_SUPPORTED
|
||||
if ((num_palette > 0 && palette == NULL) || (num_palette == 0 &&
|
||||
(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0))
|
||||
png_error(png_ptr, "Invalid palette");
|
||||
#else
|
||||
if ((num_palette > 0 && palette == NULL) || (num_palette == 0))
|
||||
png_error(png_ptr, "Invalid palette");
|
||||
#endif /* MNG_FEATURES */
|
||||
|
||||
/* It may not actually be necessary to set png_ptr->palette here;
|
||||
* we do it for backward compatibility with the way the png_handle_tRNS
|
||||
|
||||
Reference in New Issue
Block a user