core/socket: use FOREACH_ARRAY at one more place

This commit is contained in:
Mike Yuan 2024-06-17 16:39:59 +02:00
parent 64c34eb8d3
commit 42e9967baf
No known key found for this signature in database
GPG key ID: 417471C0A40F58B3

View file

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