Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-11-11 06:46:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-11-11 06:54:04 +0300
commit75c18b989c566d24c76f9f7a44271654bc07a02c (patch)
tree6abb42e2f30a50ff3c17b8a23ce6ac3ea758902b /source/blender/imbuf/intern/png.c
parent36e5c9e026a49d0ead2290ae8c1d3ec27205b4a5 (diff)
Cleanup: remove redundant NULL checks in ImFileType.is_a callback
Most of these callbacks don't do a NULL check, so there is no need to do this for bmp/png. Also correct radiance_hdr comments.
Diffstat (limited to 'source/blender/imbuf/intern/png.c')
-rw-r--r--source/blender/imbuf/intern/png.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index c4fbd3f7563..5b3311e5dd0 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -63,14 +63,13 @@ int imb_is_a_png(const unsigned char *mem)
{
int ret_val = 0;
- if (mem) {
#if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR == 2)
- /* Older version of libpng doesn't use const pointer to memory. */
- ret_val = !png_sig_cmp((png_bytep)mem, 0, 8);
+ /* Older version of libpng doesn't use const pointer to memory. */
+ ret_val = !png_sig_cmp((png_bytep)mem, 0, 8);
#else
- ret_val = !png_sig_cmp(mem, 0, 8);
+ ret_val = !png_sig_cmp(mem, 0, 8);
#endif
- }
+
return ret_val;
}