tree-wide: apply equals-null.cocci
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
@ -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';
|
||||
}
|
||||
|
Reference in New Issue
Block a user