]> granicus.if.org Git - gc/commitdiff
Fix 'condition pred!=NULL is always true' compiler warning
authorIvan Maidanski <ivmai@mail.ru>
Wed, 14 Aug 2019 09:32:52 +0000 (12:32 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 14 Aug 2019 09:32:52 +0000 (12:32 +0300)
Duplicate check of pred!=NULL is removed in add_edge.

* backgraph.c [MAKE_BACK_GRAPH] (add_edge): Remove pred!=NULL.

backgraph.c

index 8ea4251221170f74e3b93d0e94a653b710c6863b..7e33f42a7f1f8e17c1656ec97fb5f15ff1f14398 100644 (file)
@@ -240,7 +240,7 @@ static void add_edge(ptr_t p, ptr_t q)
 
       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;