Skip to content

Commit

Permalink
Merge branch 'jk/war-on-sprintf'
Browse files Browse the repository at this point in the history
* jk/war-on-sprintf:
  compat/mingw.c: remove printf format warning
  read_branches_file: plug a FILE* leak
  • Loading branch information
Junio C Hamano committed Oct 29, 2015
2 parents 7316767 + d62c89a commit 228905f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2131,7 +2131,7 @@ void mingw_startup()

int uname(struct utsname *buf)
{
DWORD v = GetVersion();
unsigned v = (unsigned)GetVersion();
memset(buf, 0, sizeof(*buf));
xsnprintf(buf->sysname, sizeof(buf->sysname), "Windows");
xsnprintf(buf->release, sizeof(buf->release),
Expand Down
1 change: 1 addition & 0 deletions remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ static void read_branches_file(struct remote *remote)
return;

strbuf_getline(&buf, f, '\n');
fclose(f);
strbuf_trim(&buf);
if (!buf.len) {
strbuf_release(&buf);
Expand Down

0 comments on commit 228905f

Please sign in to comment.