From fca515838e70f8bec7028b840bb921a1be9fabbb Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Jan 2015 16:03:11 +0100 Subject: Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage). Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places... --- source/blender/imbuf/intern/openexr/openexr_api.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/imbuf/intern/openexr/openexr_api.cpp') diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index ba1bda640a6..ad19c547db3 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -784,7 +784,7 @@ void IMB_exr_read_channels(void *handle) /* check if exr was saved with previous versions of blender which flipped images */ const StringAttribute *ta = data->ifile->header().findTypedAttribute ("BlenderMultiChannel"); - short flip = (ta && strncmp(ta->value().c_str(), "Blender V2.43", 13) == 0); /* 'previous multilayer attribute, flipped */ + short flip = (ta && STREQLEN(ta->value().c_str(), "Blender V2.43", 13)); /* 'previous multilayer attribute, flipped */ for (echan = (ExrChannel *)data->channels.first; echan; echan = echan->next) { @@ -982,7 +982,7 @@ static ExrPass *imb_exr_get_pass(ListBase *lb, char *passname) if (pass == NULL) { pass = (ExrPass *)MEM_callocN(sizeof(ExrPass), "exr pass"); - if (strcmp(passname, "Combined") == 0) + if (STREQ(passname, "Combined")) BLI_addhead(lb, pass); else BLI_addtail(lb, pass); -- cgit v1.2.3