aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-26 05:08:38 +0000
committerRoy Marples <roy@marples.name>2008-03-26 05:08:38 +0000
commit3f37d4771b7b88a9c17f8c4b677551ade486416f (patch)
tree05ef6491a5b66ecc6efb41e382b269db0f7f9237 /src
parent4f4b74e110cf124e6d992a48e5b499bced53bd46 (diff)
If we have coldplugged services, but no start_services, we need to create a new list for start_services.
Diffstat (limited to 'src')
-rw-r--r--src/rc/rc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/rc/rc.c b/src/rc/rc.c
index f5cd1dd7..59ac9b92 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -1179,11 +1179,10 @@ int main(int argc, char **argv)
}
if (coldplugged_services) {
- if (start_services) {
- TAILQ_FOREACH(service, coldplugged_services, entries)
- rc_stringlist_addu(start_services, service->value);
- } else
- start_services = coldplugged_services;
+ if (!start_services)
+ start_services = rc_stringlist_new();
+ TAILQ_FOREACH(service, coldplugged_services, entries)
+ rc_stringlist_addu(start_services, service->value);
}
}