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...
This commit is contained in:
2015-01-26 16:03:11 +01:00
parent d44890ee75
commit fca515838e
133 changed files with 467 additions and 471 deletions

View File

@@ -190,7 +190,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P
for (pid = pidlist.first; pid; pid = pid->next) {
if (pid->cache == cache)
pid2 = pid;
else if (cache->name[0] != '\0' && strcmp(cache->name, pid->cache->name) == 0) {
else if (cache->name[0] != '\0' && STREQ(cache->name, pid->cache->name)) {
/*TODO: report "name exists" to user */
BLI_strncpy(cache->name, cache->prev_name, sizeof(cache->name));
new_name = 0;