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()
This commit is contained in:
Lennart Poettering
2024-04-25 13:30:10 +02:00
parent 90db1582a9
commit 33fc8b0d95

View File

@@ -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