Merge branch 'jk/war-on-sprintf'

* jk/war-on-sprintf:
  compat/mingw.c: remove printf format warning
  read_branches_file: plug a FILE* leak
This commit is contained in:
Junio C Hamano 2015-10-29 13:59:17 -07:00
commit 228905fbce
2 changed files with 2 additions and 1 deletions

View File

@ -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),

View File

@ -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);