(ISSLASH): Define.
authorJim Meyering <jim@meyering.net>
Thu, 7 Dec 2000 14:13:13 +0000 (14:13 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 7 Dec 2000 14:13:13 +0000 (14:13 +0000)
(strip_trailing_slashes): Use ISSLASH rather than comparing against `/'.
From Prashant TR.

lib/stripslash.c

index f55c769128ad1a45775ee74b2e61964323e3c756..20cdc48b5ff87fb44e10384add15edd374aee4d6 100644 (file)
@@ -41,6 +41,6 @@ strip_trailing_slashes (char *path)
   int last;
 
   last = strlen (path) - 1;
-  while (0 < last && ISSLASH (path[last]))
+  while (last > 0 && ISSLASH (path[last]))
     path[last--] = '\0';
 }