mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
builtin/log.c: Fix an "Using plain integer as NULL pointer" warning
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
898eacd8ad
commit
22a8699a6b
|
@ -1040,7 +1040,7 @@ static char *find_branch_name(struct rev_info *rev)
|
||||||
if (positive < 0)
|
if (positive < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
strbuf_addf(&buf, "refs/heads/%s", rev->cmdline.rev[positive].name);
|
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 ||
|
if (!branch ||
|
||||||
prefixcmp(branch, "refs/heads/") ||
|
prefixcmp(branch, "refs/heads/") ||
|
||||||
hashcmp(rev->cmdline.rev[positive].item->sha1, branch_sha1))
|
hashcmp(rev->cmdline.rev[positive].item->sha1, branch_sha1))
|
||||||
|
|
Loading…
Reference in a new issue