mirror of
https://github.com/troglobit/finit.git
synced 2026-10-28 12:30:44 +00:00
Refactor, use new re-entrant svc_iterator1() API
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
bf004d9ec4
commit
7f04382eee
4 files changed
+45
-25
No files matched your search
+2
-1
@@ -88,10 +88,11 @@ static int svc_has_cond(svc_t *svc)
|
||||
|
||||
static void cond_update(const char *name)
|
||||
{
|
||||
int pos;
|
||||
svc_t *svc;
|
||||
|
||||
_d("%s", name);
|
||||
for (svc = svc_iterator(1); svc; svc = svc_iterator(0)) {
|
||||
for (svc = svc_iterator1(&pos, 1); svc; svc = svc_iterator1(&pos, 0)) {
|
||||
if (!svc_has_cond(svc) || !cond_affects(name, svc->cond))
|
||||
continue;
|
||||
|
||||
|
||||
Reference in new issue
Block a user