aboutsummaryrefslogtreecommitdiff
path: root/src/rc-status.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-09-25 15:38:21 +0000
committerRoy Marples <roy@marples.name>2007-09-25 15:38:21 +0000
commit1e4e8ed27ae95096255283e92a75738bc7e296e5 (patch)
tree5f152e91cce64bc2c9b0c6336b4078e470ac14da /src/rc-status.c
parenta2e5c4513e2955bc0a77c401ea12cc210eab305b (diff)
Initial doxygen documentation for rc.h and einfo.h. Plus some header clean ups.
Diffstat (limited to 'src/rc-status.c')
-rw-r--r--src/rc-status.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rc-status.c b/src/rc-status.c
index f75bfb83..cd4a24f8 100644
--- a/src/rc-status.c
+++ b/src/rc-status.c
@@ -117,8 +117,11 @@ int rc_status (int argc, char **argv)
while (optind < argc)
rc_strlist_add (&levels, argv[optind++]);
- if (! levels)
- rc_strlist_add (&levels, rc_get_runlevel ());
+ if (! levels) {
+ level = rc_get_runlevel ();
+ rc_strlist_add (&levels, level);
+ free (level);
+ }
STRLIST_FOREACH (levels, level, i) {
print_level (level);