]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
trunk: Remove unecessary assert
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 29 May 2020 17:16:39 +0000 (12:16 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 29 May 2020 17:16:43 +0000 (12:16 -0500)
src/lib/server/trunk.c

index b83d70a3a97d241d4150a580ade35ff38f7eeed6..f4a6231d4f05e4e7d9393a843961e7ece9e62423 100644 (file)
@@ -683,9 +683,8 @@ do { \
        int _ret; \
        if ((fr_heap_num_elements((_tconn)->pub.trunk->active) == 1)) break; \
        if (!fr_cond_assert((_tconn)->pub.state == FR_TRUNK_CONN_ACTIVE)) break; \
-       if (!fr_cond_assert((_tconn)->heap_id >= 0)) break; \
        _ret = fr_heap_extract((_tconn)->pub.trunk->active, (_tconn)); \
-       if (!fr_cond_assert_msg(_ret == 0, "Failed extracting conn from active heap: %s", fr_strerror())) break; \
+       if (!fr_cond_assert_msg(_ret == 0, "Failed extracting conn from active heap: %s", fr_strerror())) break; \      /* Will also error out if heap_id is bad - no need for assert */
        fr_heap_insert((_tconn)->pub.trunk->active, (_tconn)); \
 } while (0)