aboutsummaryrefslogtreecommitdiff
path: root/lib/getmountlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getmountlist.c')
-rw-r--r--lib/getmountlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getmountlist.c b/lib/getmountlist.c
index c0e68750..30fb9a35 100644
--- a/lib/getmountlist.c
+++ b/lib/getmountlist.c
@@ -90,7 +90,7 @@ int comma_scanall(char *optlist, char *scanlist)
{
int i = 1;
- for (;;) {
+ while (scanlist && *scanlist) {
char *opt = comma_iterate(&scanlist, &i), *s = xstrndup(opt, i);
i = comma_scan(optlist, s, 0);