aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-21 20:02:10 +0000
committerRoy Marples <roy@marples.name>2008-03-21 20:02:10 +0000
commita4f9eb699b915c90ac93a4a9af4de5456085c26c (patch)
tree0c02451b335a934f44251d643d98af0a9e69040d /src/rc/rc.c
parentf7f3b6ae093106e0f86556d1424af30e2122192a (diff)
Fix some crashers in a prefix with few services.
Diffstat (limited to 'src/rc/rc.c')
-rw-r--r--src/rc/rc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c
index 7b3d9015..499e0dc6 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -1145,9 +1145,13 @@ int main(int argc, char **argv)
}
}
- if (coldplugged_services)
- TAILQ_FOREACH(service, coldplugged_services, entries)
- rc_stringlist_addu(start_services, service->value);
+ if (coldplugged_services) {
+ if (start_services) {
+ TAILQ_FOREACH(service, coldplugged_services, entries)
+ rc_stringlist_addu(start_services, service->value);
+ } else
+ start_services = coldplugged_services;
+ }
}
/* Save our softlevel now */