summaryrefslogtreecommitdiff
path: root/src/rc/rc-status.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-18 15:28:20 +0000
committerRoy Marples <roy@marples.name>2008-09-18 15:28:20 +0000
commit39ea0cb84dd2eded881e1c77e758505dd08beb99 (patch)
treedb7ab94b2d89471359dc605d623d063025c84825 /src/rc/rc-status.c
parent17bf78a53948a5e90c5b1f5d346cda1825d9a52e (diff)
downloadopenrc-39ea0cb84dd2eded881e1c77e758505dd08beb99.tar.gz
openrc-39ea0cb84dd2eded881e1c77e758505dd08beb99.tar.bz2
openrc-39ea0cb84dd2eded881e1c77e758505dd08beb99.tar.xz
Use the new rc_stringlist_find function.
Diffstat (limited to 'src/rc/rc-status.c')
-rw-r--r--src/rc/rc-status.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c
index 41ac651..c25a4ee 100644
--- a/src/rc/rc-status.c
+++ b/src/rc/rc-status.c
@@ -128,7 +128,7 @@ static void print_service(const char *service)
static void print_services(const char *runlevel, RC_STRINGLIST *services)
{
RC_STRINGLIST *l = NULL;
- RC_STRING *s, *t;
+ RC_STRING *s;
char *r = NULL;
if (! services)
@@ -156,10 +156,7 @@ static void print_services(const char *runlevel, RC_STRINGLIST *services)
if (!l)
return;
TAILQ_FOREACH(s, l, entries) {
- TAILQ_FOREACH(t, services, entries)
- if (strcmp(t->value, s->value) == 0)
- break;
- if (!t)
+ if (!rc_stringlist_find(services, s->value))
continue;
if (!runlevel || rc_service_in_runlevel(s->value, runlevel))
print_service(s->value);