aboutsummaryrefslogtreecommitdiff
path: root/src/rc-status.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-09-18 11:36:55 +0000
committerRoy Marples <roy@marples.name>2007-09-18 11:36:55 +0000
commitf1bba128929778c21168e84b8970f6623611dc6e (patch)
tree25bbbf017bd14dfe9a81ff4070c70d24dd8a7848 /src/rc-status.c
parent99eabdc3ba537194432a11c5793ca4117296227b (diff)
API change! rc_strlist_add and friends now take char *** instead of
char ** and return a pointer to the item added instead of the new list head. This is so we can easily tell if the item was successfully added or not instead of iterating through the list looking for it. list = rc_strlist_add (list, item); becomes rc_strlist_add (&list, item);
Diffstat (limited to 'src/rc-status.c')
-rw-r--r--src/rc-status.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rc-status.c b/src/rc-status.c
index 999026e7..5cde05ef 100644
--- a/src/rc-status.c
+++ b/src/rc-status.c
@@ -114,10 +114,10 @@ int rc_status (int argc, char **argv)
}
while (optind < argc)
- levels = rc_strlist_add (levels, argv[optind++]);
+ rc_strlist_add (&levels, argv[optind++]);
if (! levels)
- levels = rc_strlist_add (NULL, rc_get_runlevel ());
+ rc_strlist_add (&levels, rc_get_runlevel ());
STRLIST_FOREACH (levels, level, i) {
print_level (level);