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/blenlib/intern/storage.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/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 4c5268562ad..0d09b50a52c 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -135,10 +135,10 @@ static int bli_compare(struct direntry *entry1, struct direntry *entry2) /* OK, now we know their S_IFMT fields are the same, go on to a name comparison */ /* make sure "." and ".." are always first */ - if (strcmp(entry1->relname, ".") == 0) return (-1); - if (strcmp(entry2->relname, ".") == 0) return (1); - if (strcmp(entry1->relname, "..") == 0) return (-1); - if (strcmp(entry2->relname, "..") == 0) return (1); + if (STREQ(entry1->relname, ".")) return (-1); + if (STREQ(entry2->relname, ".")) return (1); + if (STREQ(entry1->relname, "..")) return (-1); + if (STREQ(entry2->relname, "..")) return (1); return (BLI_natstrcmp(entry1->relname, entry2->relname)); } |