OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1e85b9
)
comma_scan()'s clean option wasn't removing entry at end of list.
author
Rob Landley
<rob@landley.net>
Tue, 11 Jul 2017 10:16:09 +0000
(
05:16
-0500)
committer
Rob Landley
<rob@landley.net>
Tue, 11 Jul 2017 10:16:09 +0000
(
05:16
-0500)
lib/getmountlist.c
patch
|
blob
|
history
diff --git
a/lib/getmountlist.c
b/lib/getmountlist.c
index
332852a
..
f7d58ab
100644
(file)
--- a/
lib/getmountlist.c
+++ b/
lib/getmountlist.c
@@
-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;
+ }
}
}