about summary refs log tree commit diff
path: root/mlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'mlist.c')
-rw-r--r--mlist.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/mlist.c b/mlist.c
index 8ad53f9..d796fc7 100644
--- a/mlist.c
+++ b/mlist.c
@@ -168,17 +168,7 @@ listdir(char *dir)
 void
 listarg(char *arg)
 {
-	char *s, *t;
-
-	// squeeze slashes
-	s = t = arg;
-	while ((*s++ = *t))
-		while (*t++ == '/' && *t == '/')
-			;
-	// remove trailing slashes
-	s--;
-	while (*--s == '/')
-		*s = 0;
+	squeeze_slash(arg);
 
 	struct stat st;
 	if (stat(arg, &st) < 0)