1
0
mirror of https://github.com/git/git.git synced 2025-04-14 15:25:28 +00:00

revision.c: remove unneeded check for NULL

The function is called only from one place, which makes sure to have
`interesting_cache` not NULL.  Additionally the variable is a
dereferenced a few lines before unconditionally, which would have
resulted in a segmentation fault before hitting this check.

Signed-off-by: Stefan Beller <sbeller@google.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Stefan Beller 2015-06-26 12:40:19 -07:00 committed by Junio C Hamano
parent b6e8a3b540
commit ae40ebda9b

@ -350,8 +350,8 @@ static int everybody_uninteresting(struct commit_list *orig,
list = list->next;
if (commit->object.flags & UNINTERESTING)
continue;
if (interesting_cache)
*interesting_cache = commit;
*interesting_cache = commit;
return 0;
}
return 1;