diff options
author | Roy Marples <roy@marples.name> | 2007-09-18 11:36:55 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-09-18 11:36:55 +0000 |
commit | f1bba128929778c21168e84b8970f6623611dc6e (patch) | |
tree | 25bbbf017bd14dfe9a81ff4070c70d24dd8a7848 /src/rc-depend.c | |
parent | 99eabdc3ba537194432a11c5793ca4117296227b (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-depend.c')
-rw-r--r-- | src/rc-depend.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rc-depend.c b/src/rc-depend.c index 9d45e9c1..3201fc77 100644 --- a/src/rc-depend.c +++ b/src/rc-depend.c @@ -57,7 +57,7 @@ int rc_depend (int argc, char **argv) if (argv[i][0] == '-') { argv[i]++; - types = rc_strlist_add (types, argv[i]); + rc_strlist_add (&types, argv[i]); } else { if ((deptree = rc_load_deptree ()) == NULL) eerrorx ("failed to load deptree"); @@ -66,7 +66,7 @@ int rc_depend (int argc, char **argv) if (! di) eerror ("no dependency info for service `%s'", argv[i]); else - services = rc_strlist_add (services, argv[i]); + rc_strlist_add (&services, argv[i]); } } @@ -80,8 +80,8 @@ int rc_depend (int argc, char **argv) /* If we don't have any types, then supply some defaults */ if (! types) { - types = rc_strlist_add (NULL, "ineed"); - rc_strlist_add (types, "iuse"); + rc_strlist_add (&types, "ineed"); + rc_strlist_add (&types, "iuse"); } depends = rc_get_depends (deptree, types, services, runlevel, options); |