Skip to content

Commit ae40ebd

Browse files
stefanbellergitster
authored andcommitted
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>
1 parent b6e8a3b commit ae40ebd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

revision.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ static int everybody_uninteresting(struct commit_list *orig,
350350
list = list->next;
351351
if (commit->object.flags & UNINTERESTING)
352352
continue;
353-
if (interesting_cache)
354-
*interesting_cache = commit;
353+
354+
*interesting_cache = commit;
355355
return 0;
356356
}
357357
return 1;

0 commit comments

Comments
 (0)