Skip to content

Commit 92d5a63

Browse files
cswareethomson
authored andcommitted
win32: deduplicate code: use p_open in p_creat
Signed-off-by: Sven Strickroth <email@cs-ware.de>
1 parent ef5cfcd commit 92d5a63

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/win32/posix_w32.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -520,14 +520,7 @@ int p_open(const char *path, int flags, ...)
520520

521521
int p_creat(const char *path, mode_t mode)
522522
{
523-
git_win32_path buf;
524-
525-
if (git_win32_path_from_utf8(buf, path) < 0)
526-
return -1;
527-
528-
return _wopen(buf,
529-
_O_WRONLY | _O_CREAT | _O_TRUNC | STANDARD_OPEN_FLAGS,
530-
mode & WIN32_MODE_MASK);
523+
return p_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode);
531524
}
532525

533526
int p_getcwd(char *buffer_out, size_t size)

0 commit comments

Comments
 (0)