Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e1fa15

Browse files
committed
I'm a dick
1 parent 987ab76 commit 2e1fa15

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/fileops.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,9 @@ int git_futils_mkdir(
277277
mode_t mode,
278278
uint32_t flags)
279279
{
280-
int error = -1, tmp;
280+
int error = -1, tmp_errno;
281281
git_buf make_path = GIT_BUF_INIT;
282-
ssize_t root = 0;
282+
ssize_t root = 0, min_root_len;
283283
char lastch, *tail;
284284

285285
/* build path and find "root" where we should start calling mkdir */
@@ -316,9 +316,9 @@ int git_futils_mkdir(
316316
root = 0;
317317

318318
/* make sure mkdir root is at least after filesystem root */
319-
tmp = git_path_root(make_path.ptr);
320-
if (root < tmp)
321-
root = tmp;
319+
min_root_len = git_path_root(make_path.ptr);
320+
if (root < min_root_len)
321+
root = min_root_len;
322322

323323
tail = & make_path.ptr[root];
324324

@@ -357,15 +357,15 @@ int git_futils_mkdir(
357357
* or at the root of a volume. If the path is a dir, just
358358
* treat as EEXIST.
359359
*/
360-
tmp = errno;
360+
tmp_errno = errno;
361361

362362
if (git_path_isdir(make_path.ptr)) {
363363
already_exists = 1;
364364
break;
365365
}
366366

367367
/* Fall through */
368-
errno = tmp;
368+
errno = tmp_errno;
369369
default:
370370
giterr_set(GITERR_OS, "Failed to make directory '%s'",
371371
make_path.ptr);

0 commit comments

Comments
 (0)