diff options
Diffstat (limited to 'source/blender/imbuf/intern/jpeg.c')
-rw-r--r-- | source/blender/imbuf/intern/jpeg.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c index f4b5f987869..6093a1477ce 100644 --- a/source/blender/imbuf/intern/jpeg.c +++ b/source/blender/imbuf/intern/jpeg.c @@ -37,6 +37,7 @@ #include "MEM_guardedalloc.h" +#include "BLI_utildefines.h" #include "BLI_string.h" #include "BLI_fileops.h" @@ -267,7 +268,7 @@ handle_app1(j_decompress_ptr cinfo) if (length < 16) { for (i = 0; i < length; i++) INPUT_BYTE(cinfo, neogeo[i], return false); length = 0; - if (strncmp(neogeo, "NeoGeo", 6) == 0) memcpy(&ibuf_ftype, neogeo + 6, 4); + if (STREQLEN(neogeo, "NeoGeo", 6)) memcpy(&ibuf_ftype, neogeo + 6, 4); ibuf_ftype = BIG_LONG(ibuf_ftype); } INPUT_SYNC(cinfo); /* do before skip_input_data */ @@ -385,7 +386,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla * That is why we need split it to the * common key/value here. */ - if (strncmp(str, "Blender", 7)) { + if (!STREQLEN(str, "Blender", 7)) { /* * Maybe the file have text that * we don't know "what it's", in that @@ -494,7 +495,7 @@ static void write_jpeg(struct jpeg_compress_struct *cinfo, struct ImBuf *ibuf) text = MEM_mallocN(530, "stamp info read"); iptr = ibuf->metadata; while (iptr) { - if (!strcmp(iptr->key, "None")) { + if (STREQ(iptr->key, "None")) { jpeg_write_marker(cinfo, JPEG_COM, (JOCTET *) iptr->value, strlen(iptr->value) + 1); goto next_stamp_info; } |