From 4d9121976da7cf9c54f8cb4e9901ee5b0e5206f3 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 9 Nov 2018 01:05:51 +0300 Subject: [PATCH] Eliminate redundant check in backwards_height This eliminates 'the condition pred!=NULL is redundant' cppcheck warning. * backgraph.c [MAKE_BACK_GRAPH] (backwards_height): Remove duplicate pred!=NULL check (the case of NULL is already handled by "if(NULL==pred)return 1" statement). --- backgraph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backgraph.c b/backgraph.c index 93b50b8..d43d170 100644 --- a/backgraph.c +++ b/backgraph.c @@ -399,7 +399,7 @@ static word backwards_height(ptr_t p) if (((word)pred & FLAG_MANY) != 0) { n_edges = e -> n_edges; - } else if (pred != NULL && ((word)pred & 1) == 0) { + } else if (((word)pred & 1) == 0) { /* A misinterpreted freelist link. */ n_edges = 1; local = -1; -- 2.7.4