From: Mike Yuan Date: Sun, 25 Aug 2024 21:29:26 +0000 (+0200) Subject: core/socket: use UNIT_ISSET rather than _DEREF where suitable X-Git-Tag: v257-rc1~621^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f220d98945d0a365f71814a3c92157ed129e84f0;p=thirdparty%2Fsystemd.git core/socket: use UNIT_ISSET rather than _DEREF where suitable --- 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)