RET_GATHER(r, verify_executable(u, exec, root));
if (u->type == UNIT_SERVICE)
- for (unsigned i = 0; i < ELEMENTSOF(SERVICE(u)->exec_command); i++)
- RET_GATHER(r, verify_executable(u, SERVICE(u)->exec_command[i], root));
+ FOREACH_ARRAY(i, SERVICE(u)->exec_command, ELEMENTSOF(SERVICE(u)->exec_command))
+ RET_GATHER(r, verify_executable(u, *i, root));
if (u->type == UNIT_SOCKET)
- for (unsigned i = 0; i < ELEMENTSOF(SOCKET(u)->exec_command); i++)
- RET_GATHER(r, verify_executable(u, SOCKET(u)->exec_command[i], root));
+ FOREACH_ARRAY(i, SOCKET(u)->exec_command, ELEMENTSOF(SOCKET(u)->exec_command))
+ RET_GATHER(r, verify_executable(u, *i, root));
return r;
}
return r;
}
-static void set_destroy_ignore_pointer_max(Set** s) {
+static void set_destroy_ignore_pointer_max(Set **s) {
if (*s == POINTER_MAX)
return;
set_free_free(*s);
count++;
}
- for (int i = 0; i < count; i++)
- RET_GATHER(r, verify_unit(units[i], check_man, root));
+ FOREACH_ARRAY(i, units, count)
+ RET_GATHER(r, verify_unit(*i, check_man, root));
if (s == POINTER_MAX)
return log_oom();