From: Lennart Poettering Date: Thu, 25 Apr 2024 11:30:10 +0000 (+0200) Subject: core: fix assertions in manager_dispatch_user_lookup_fd() X-Git-Tag: v256-rc1~14^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33fc8b0d95bb05718e93476e7aa0cd6e65b0062a;p=thirdparty%2Fsystemd.git core: fix assertions in manager_dispatch_user_lookup_fd() assert_se() should not be used here, these checks are paranoia only and have no side-effect after all. hence fix this to use assert(), or in fact ASSERT_PTR() --- diff --git a/src/core/manager.c b/src/core/manager.c index 11a81139868..89c80821b94 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -4776,13 +4776,12 @@ static int manager_dispatch_user_lookup_fd(sd_event_source *source, int fd, uint char unit_name[UNIT_NAME_MAX+1]; } _packed_ buffer; - Manager *m = userdata; + Manager *m = ASSERT_PTR(userdata); ssize_t l; size_t n; Unit *u; - assert_se(source); - assert_se(m); + assert(source); /* Invoked whenever a child process succeeded resolving its user/group to use and sent us the * resulting UID/GID in a datagram. We parse the datagram here and pass it off to the unit, so that