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/mountinfo.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/mountinfo.c')
-rw-r--r-- | src/mountinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mountinfo.c b/src/mountinfo.c index eb60a4d9..dd7ca4e8 100644 --- a/src/mountinfo.c +++ b/src/mountinfo.c @@ -117,7 +117,7 @@ static int process_mount (char ***list, struct args *args, if (p) { errno = 0; - *list = rc_strlist_addsortc (*list, p); + rc_strlist_addsortc (list, p); return (0); } @@ -332,7 +332,7 @@ int mountinfo (int argc, char **argv) while (optind < argc) { if (argv[optind][0] != '/') eerrorx ("%s: `%s' is not a mount point", argv[0], argv[optind]); - args.mounts = rc_strlist_add (args.mounts, argv[optind++]); + rc_strlist_add (&args.mounts, argv[optind++]); } nodes = find_mounts (&args); |