diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-26 18:03:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-01-26 18:59:24 +0300 |
commit | fca515838e70f8bec7028b840bb921a1be9fabbb (patch) | |
tree | 1752923de19eca5f01ca4cfb5754fd4d1f13d934 /source/blender/blenloader/intern/versioning_legacy.c | |
parent | d44890ee75634052f325531766a661a5bcef628f (diff) |
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...
Diffstat (limited to 'source/blender/blenloader/intern/versioning_legacy.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_legacy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index a28ca7d187a..5dae6fbc464 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -1299,7 +1299,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) Object *ob; for (vf = main->vfont.first; vf; vf = vf->id.next) { - if (strcmp(vf->name + strlen(vf->name)-6, ".Bfont") == 0) { + if (STREQ(vf->name + strlen(vf->name)-6, ".Bfont")) { strcpy(vf->name, FO_BUILTIN_NAME); } } @@ -2314,7 +2314,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) if (main->versionfile == 241) { Image *ima; for (ima = main->image.first; ima; ima = ima->id.next) - if (strcmp(ima->name, "Compositor") == 0) { + if (STREQ(ima->name, "Compositor")) { strcpy(ima->id.name + 2, "Viewer Node"); strcpy(ima->name, "Viewer Node"); } @@ -2502,11 +2502,11 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *main) ima->gen_x = 256; ima->gen_y = 256; ima->gen_type = 1; - if (0 == strncmp(ima->id.name + 2, "Viewer Node", sizeof(ima->id.name) - 2)) { + if (STREQLEN(ima->id.name + 2, "Viewer Node", sizeof(ima->id.name) - 2)) { ima->source = IMA_SRC_VIEWER; ima->type = IMA_TYPE_COMPOSITE; } - if (0 == strncmp(ima->id.name + 2, "Render Result", sizeof(ima->id.name) - 2)) { + if (STREQLEN(ima->id.name + 2, "Render Result", sizeof(ima->id.name) - 2)) { ima->source = IMA_SRC_VIEWER; ima->type = IMA_TYPE_R_RESULT; } |