From 17bf78a53948a5e90c5b1f5d346cda1825d9a52e Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 18 Sep 2008 15:20:57 +0000 Subject: Use the new rc_stringlist_find function. --- src/rc/rc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/rc') diff --git a/src/rc/rc.c b/src/rc/rc.c index 6e1c3bba..62544cad 100644 --- a/src/rc/rc.c +++ b/src/rc/rc.c @@ -784,10 +784,7 @@ static void do_stop_services(const char *newlevel, bool going_down, bool paralle } /* If we're in the start list then don't bother stopping us */ - TAILQ_FOREACH(svc1, start_services, entries) - if (strcmp (svc1->value, service->value) == 0) - break; - + svc1 = rc_stringlist_find(start_services, service->value); if (svc1) { if (newlevel && strcmp(runlevel, newlevel) != 0) { /* So we're in the start list. But we should @@ -813,9 +810,7 @@ static void do_stop_services(const char *newlevel, bool going_down, bool paralle rc_stringlist_free(tmplist); svc2 = NULL; TAILQ_FOREACH (svc1, deporder, entries) { - TAILQ_FOREACH(svc2, start_services, entries) - if (strcmp (svc1->value, svc2->value) == 0) - break; + svc2 = rc_stringlist_find(start_services, svc1->value); if (svc2) break; } -- cgit v1.2.3