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/editors/space_file/file_ops.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/editors/space_file/file_ops.c')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 3a579820106..697ac23c84d 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -183,11 +183,11 @@ static FileSelect file_select_do(bContext *C, int selected_idx, bool do_diropen) retval = FILE_SELECT_DIR; } /* the path is too long and we are not going up! */ - else if (strcmp(file->relname, "..") && strlen(params->dir) + strlen(file->relname) >= FILE_MAX) { + else if (!STREQ(file->relname, "..") && strlen(params->dir) + strlen(file->relname) >= FILE_MAX) { // XXX error("Path too long, cannot enter this directory"); } else { - if (strcmp(file->relname, "..") == 0) { + if (STREQ(file->relname, "..")) { /* avoids /../../ */ BLI_parent_dir(params->dir); } |