summaryrefslogtreecommitdiff
path: root/compat/mkdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/mkdir.c')
-rw-r--r--compat/mkdir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/mkdir.c b/compat/mkdir.c
index 9e253fb72f..02aea3b32e 100644
--- a/compat/mkdir.c
+++ b/compat/mkdir.c
@@ -9,7 +9,7 @@ int compat_mkdir_wo_trailing_slash(const char *dir, mode_t mode)
size_t len = strlen(dir);
if (len && dir[len-1] == '/') {
- if ((tmp_dir = strdup(dir)) == NULL)
+ if (!(tmp_dir = strdup(dir)))
return -1;
tmp_dir[len-1] = '\0';
}