about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mlist.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mlist.c b/mlist.c
index 725a76d..8ad53f9 100644
--- a/mlist.c
+++ b/mlist.c
@@ -173,9 +173,8 @@ listarg(char *arg)
 	// squeeze slashes
 	s = t = arg;
 	while ((*s++ = *t))
-		if (*t++ == '/')
-			while (*t == '/')
-				t++;
+		while (*t++ == '/' && *t == '/')
+			;
 	// remove trailing slashes
 	s--;
 	while (*--s == '/')