]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix arguments inside of preprocessor condition warning
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 16 Jan 2021 16:27:16 +0000 (16:27 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 16 Jan 2021 16:27:16 +0000 (16:27 +0000)
src/lib/util/event.c

index e567d68225d7a75b72e13a52ae8058e71d866df3..ed756adac0611b4c392f4436275f42038b714eb7 100644 (file)
@@ -1179,20 +1179,22 @@ static int _event_timer_free(fr_event_timer_t *ev)
        if (fr_dlist_entry_in_list(&ev->entry)) {
                (void) fr_dlist_remove(&el->ev_to_add, ev);
        } else {
-               int     ret = fr_heap_extract(el->times, ev);
+               int             ret = fr_heap_extract(el->times, ev);
+               char const      *file = "not-available";
+               int             line = 0;
+
+#ifndef NDEBUG
+               file = ev->file;
+               line = ev->line;
+#endif
 
                /*
                 *      Events MUST be in the heap (or the insertion list).
                 */
                if (!fr_cond_assert_msg(ret == 0,
                                        "Event %p, heap_id %i, allocd %s[%u], was not found in the event heap or "
-                                       "insertion list when freed: %s", ev, ev->heap_id,
-#ifndef NDEBUG
-                                       ev->file, ev->line,
-#else
-                                       "not-available", 0,
-#endif
-                                       fr_strerror())) return -1;
+                                       "insertion list when freed: %s", ev, ev->heap_id, file, line,
+                                        fr_strerror())) return -1;
        }
 
        ev_p = ev->parent;