Skip to contentSkip to conversation

builtin/log.c: Fix an "Using plain integer as NULL pointer" warning

PATCH New Ramsay Jones 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 builtin/log.c: Fix an "Using plain integer as NULL pointer" warning

---

Hi Junio,

I wanted to request that you squash this into commit 739453a3 (format-patch: use branch description in cover letter, 21-09-2011). But, since that's in next ...

Hmm, I should probably start at least building the pu branch so that I could catch these things earlier ...

ATB,
Ramsay Jones

 builtin/log.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
builtin/log.c +1 -1
index e80a925..4395f3e 100644
@@ -1040,7 +1040,7 @@ static char *find_branch_name(struct rev_info *rev)
 	if (positive < 0)
 		return NULL;
 	strbuf_addf(&buf, "refs/heads/%s", rev->cmdline.rev[positive].name);
-	branch = resolve_ref(buf.buf, branch_sha1, 1, 0);
+	branch = resolve_ref(buf.buf, branch_sha1, 1, NULL);
 	if (!branch ||
 	    prefixcmp(branch, "refs/heads/") ||
 	    hashcmp(rev->cmdline.rev[positive].item->sha1, branch_sha1))
Signature · 1 line
1.7.7