Refactor, use new re-entrant svc_iterator1() API

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-12-18 00:21:07 +01:00
1 parent bf004d9ec4
commit 7f04382eee
4 files changed
+45 -25

No files matched your search

+2 -1
View File
@@ -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;