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 <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b6e8a3b commit ae40ebd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)