swrap: fix SWRAP_DLIST_ADD_AFTER
[socket_wrapper.git] / src / socket_wrapper.c
index 40e2f0438e064a1864bd8ecf9fe5f0681272cfe8..d40f8b611e94385ca18a2b49675221c9b3a4fb93 100644 (file)
@@ -211,7 +211,7 @@ enum swrap_dbglvl_e {
 
 #define SWRAP_DLIST_ADD_AFTER(list, item, el) \
 do { \
-       if ((list) != NULL || (el) != NULL) { \
+       if ((list) == NULL || (el) == NULL) { \
                SWRAP_DLIST_ADD(list, item); \
        } else { \
                (item)->prev = (el); \