Skip to content

Commit 53a3972

Browse files
mhaggergitster
authored andcommitted
safe_create_leading_directories(): fix format of "if" chaining
Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5512ac5 commit 53a3972

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sha1_file.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,15 @@ int safe_create_leading_directories(char *path)
125125
*pos = '/';
126126
return -3;
127127
}
128-
}
129-
else if (mkdir(path, 0777)) {
128+
} else if (mkdir(path, 0777)) {
130129
if (errno == EEXIST &&
131130
!stat(path, &st) && S_ISDIR(st.st_mode)) {
132131
; /* somebody created it since we checked */
133132
} else {
134133
*pos = '/';
135134
return -1;
136135
}
137-
}
138-
else if (adjust_shared_perm(path)) {
136+
} else if (adjust_shared_perm(path)) {
139137
*pos = '/';
140138
return -2;
141139
}

0 commit comments

Comments
 (0)