X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fbasename.c;h=36e0f62b13d797b85f9d0ffa2620717503739818;hb=be888b85ebe1d2e8c04a2dfc28144e164ba02865;hp=5237b11b72ab3fc74e18c6500205824a53d5b988;hpb=f7d19549bc142b6713e28c6dd029c6478c2c1bda;p=gnulib.git diff --git a/lib/basename.c b/lib/basename.c index 5237b11b7..36e0f62b1 100644 --- a/lib/basename.c +++ b/lib/basename.c @@ -1,5 +1,5 @@ /* basename.c -- return the last element in a path - Copyright (C) 1990, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1990, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ # include #endif +#include #include #ifndef FILESYSTEM_PREFIX_LEN @@ -64,7 +65,7 @@ base_name (char const *name) --base; /* Make sure the last byte is not a slash. */ - assert (all_slashes || *(p - 1) != '/'); + assert (all_slashes || !ISSLASH (*(p - 1))); return (char *) base; }