commit | 58fea0ea98ed7145f15acc851b8dbaa17e111ebd | [log] [tgz] |
---|---|---|
author | Rob Landley <rob@landley.net> | Tue Jul 11 05:16:09 2017 -0500 |
committer | Rob Landley <rob@landley.net> | Tue Jul 11 05:16:09 2017 -0500 |
tree | 9cdb9e7462f22511630e4338e4a4138d9c5cd5d7 | |
parent | d1e85b9c4688c52a5c97dfe097fb932f0c7c3bbd [diff] |
comma_scan()'s clean option wasn't removing entry at end of list.
diff --git a/lib/getmountlist.c b/lib/getmountlist.c index 332852a..f7d58ab 100644 --- a/lib/getmountlist.c +++ b/lib/getmountlist.c
@@ -97,7 +97,10 @@ no = 2*(*s == 'n' && s[1] == 'o'); if (optlen == len-no && !strncmp(opt, s+no, optlen)) { got = !no; - if (clean && optlist) memmove(s, optlist, strlen(optlist)+1); + if (clean) { + if (optlist) memmove(s, optlist, strlen(optlist)+1); + else *s = 0; + } } }