diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-06-17 16:39:59 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-06-17 16:56:19 +0200 |
commit | 42e9967baf78030af67448c42a6e92dae142c409 (patch) | |
tree | 4fe243f42de510d90cba337c62943c2304d2fd3b /src | |
parent | hwdb: add support for AIPTEK Media Tablet Ultimate (#33371) (diff) | |
download | systemd-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.c | 6 |
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; |