convert a > expression to the equivalent < one
[gnulib.git] / lib / dirname.c
index 7826d8e..94f8c89 100644 (file)
@@ -113,7 +113,7 @@ dir_name_r (char const *path, char const **result)
         canonicalized "d:/path", leave alone the root case "d:/".  */
       char const *lim = path + FILESYSTEM_PREFIX_LEN (path);
 
-      while (slash > lim && ISSLASH (*slash))
+      while (lim < slash && ISSLASH (*slash))
        --slash;
 
       length = slash - path + 1;