From f220d98945d0a365f71814a3c92157ed129e84f0 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Sun, 25 Aug 2024 23:29:26 +0200 Subject: [PATCH] core/socket: use UNIT_ISSET rather than _DEREF where suitable --- src/core/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/socket.c b/src/core/socket.c index 9cb188abc79..3c866cee935 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -328,7 +328,7 @@ static int socket_add_extras(Socket *s) { if (have_non_accept_socket(s)) { - if (!UNIT_DEREF(s->service)) { + if (!UNIT_ISSET(s->service)) { Unit *x; r = unit_load_related_unit(u, ".service", &x); @@ -416,7 +416,7 @@ static int socket_verify(Socket *s) { if (s->accept && s->max_connections <= 0) return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "MaxConnection= setting too small. Refusing."); - if (s->accept && UNIT_DEREF(s->service)) + if (s->accept && UNIT_ISSET(s->service)) return log_unit_error_errno(UNIT(s), SYNTHETIC_ERRNO(ENOEXEC), "Explicit service configuration for accepting socket units not supported. Refusing."); if (s->exec_context.pam_name && s->kill_context.kill_mode != KILL_CONTROL_GROUP)