Permalink
Browse files

comma_scan()'s clean option wasn't removing entry at end of list.

  • Loading branch information...
landley committed Jul 11, 2017
1 parent d1e85b9 commit 58fea0ea98ed7145f15acc851b8dbaa17e111ebd
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/getmountlist.c
View
@@ -97,7 +97,10 @@ int comma_scan(char *optlist, char *opt, int clean)
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;
}
}
}

0 comments on commit 58fea0e

Please sign in to comment.