]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mt_lists: Appease gcc.
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 11 Mar 2020 14:09:16 +0000 (15:09 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 11 Mar 2020 16:10:08 +0000 (17:10 +0100)
gcc is confused, and think p may end up being NULL in _MT_LIST_RELINK_DELETED.
It should never happen, so let gcc know that.

include/common/mini-clist.h

index f18e3f072fabb3f43fb1e4b603df6a0a46e9606a..a7b5a5dd87067e477e1006a21241931ec1502708 100644 (file)
@@ -608,6 +608,7 @@ struct cond_wordlist {
 #define _MT_LIST_RELINK_DELETED(elt2)                                      \
     do {                                                                   \
            struct mt_list *n = elt2.next, *p = elt2.prev;                 \
+           ALREADY_CHECKED(p);                                            \
            n->prev = p;                                                   \
            p->next = n;                                                   \
     } while (0);