aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-18 15:20:57 +0000
committerRoy Marples <roy@marples.name>2008-09-18 15:20:57 +0000
commit17bf78a53948a5e90c5b1f5d346cda1825d9a52e (patch)
tree68079a06dec022bb382621c6809a90a64692f433
parent072328ff60dc56d6943b78fec8f17810424d67e2 (diff)
Use the new rc_stringlist_find function.
-rw-r--r--src/rc/rc.c9
1 files changed, 2 insertions, 7 deletions
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;
}