summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-06-17 16:39:59 +0200
committerMike Yuan <me@yhndnzj.com>2024-06-17 16:56:19 +0200
commit42e9967baf78030af67448c42a6e92dae142c409 (patch)
tree4fe243f42de510d90cba337c62943c2304d2fd3b /src
parenthwdb: add support for AIPTEK Media Tablet Ultimate (#33371) (diff)
downloadsystemd-42e9967baf78030af67448c42a6e92dae142c409.tar.xz
systemd-42e9967baf78030af67448c42a6e92dae142c409.zip
core/socket: use FOREACH_ARRAY at one more place
Diffstat (limited to 'src')
-rw-r--r--src/core/socket.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 339d77fb97..4be308265a 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -272,12 +272,10 @@ static int socket_add_default_dependencies(Socket *s) {
}
static bool socket_has_exec(Socket *s) {
- unsigned i;
-
assert(s);
- for (i = 0; i < _SOCKET_EXEC_COMMAND_MAX; i++)
- if (s->exec_command[i])
+ FOREACH_ARRAY(i, s->exec_command, _SOCKET_EXEC_COMMAND_MAX)
+ if (*i)
return true;
return false;