git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Oct 8, 2011, 16:18 UTC
Message-ID
<4E9077B8.7080202@ramsay1.demon.co.uk>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
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(-)
diff --git a/builtin/log.c b/builtin/log.c
index e80a925..4395f3e 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -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))
-- 
1.7.7
Message 1 of 1 in “builtin/log.c: Fix an "Using plain integer as NULL pointer" warning”
  1. builtin/log.c: Fix an "Using plain integer as NULL pointer" warningRamsay Jones, Oct 8, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.