]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(__xpg_basename): Don't return pointer to slash before the basename.
authorUlrich Drepper <drepper@redhat.com>
Sun, 10 Oct 1999 20:48:58 +0000 (20:48 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 10 Oct 1999 20:48:58 +0000 (20:48 +0000)
stdlib/xpg_basename.c

index b789bc9a1a69a66a2e37be4ffba1642347c0ec50..0e36807165762c33662797837c66d57f64c1ea4c 100644 (file)
@@ -1,5 +1,5 @@
 /* Return basename of given pathname according to the weird XPG specification.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -62,6 +62,9 @@ __xpg_basename (char *filename)
                while (p[1] != '\0')
                  ++p;
            }
+         else
+           /* Go to the first character of the name.  */
+           ++p;
        }
     }