From: Zbigniew Jędrzejewski-Szmek Date: Tue, 14 Jul 2026 13:17:56 +0000 (+0200) Subject: network: do not use assert() on a call with side effects X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e6fe7f51f7f32127f250d6691d2e0797db34bdd;p=thirdparty%2Fsystemd.git network: do not use assert() on a call with side effects Fixes bf943a9d49941801b45e4631f010359619173d12. --- diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c index 08bb2bfd122..31745b3600f 100644 --- a/src/network/networkd-ndisc.c +++ b/src/network/networkd-ndisc.c @@ -2052,7 +2052,7 @@ static int ndisc_router_process_captive_portal(Link *link, sd_ndisc_router *rt, target = c; assert(target); - assert(set_remove(link->ndisc_captive_portals, target) == target); + assert_se(set_remove(link->ndisc_captive_portals, target) == target); ndisc_captive_portal_free(target); }