summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2015-06-26 12:40:19 -0700
committerJunio C Hamano <gitster@pobox.com>2015-06-29 09:54:18 -0700
commitae40ebda9bf68b0be8deafd93b7982d443f2b1b2 (patch)
treeca7595feb27d19e68aa2f24e4f351339b0661fb2 /revision.c
parentb6e8a3b5404606f156a14bac262d7e9adf620990 (diff)
downloadgit-ae40ebda9bf68b0be8deafd93b7982d443f2b1b2.tar.gz
revision.c: remove unneeded check for NULLjk/still-interesting
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>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/revision.c b/revision.c
index 06f31d6fb5..e04bd3dffe 100644
--- a/revision.c
+++ b/revision.c
@@ -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;