diff options
author | Ken Brown <kbrown@cornell.edu> | 2017-10-25 01:21:53 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2017-10-25 18:02:26 +0300 |
commit | 3e8323dc06acd4c1a39b53c38d3bd7acd7102756 (patch) | |
tree | 9aaf9c63d018963c6d3b404779f58b760d4d28e9 /winsup/utils/dump_setup.cc | |
parent | f6ef29c48fcb87b042f067b0815bcada64e6dd10 (diff) |
winsup/utils/dump_setup.cc: Remove the function 'base'
This was called only on filenames in /etc/setup/installed.db, which
are all basenames anyway. Moreover, base wasn't correctly handling
filenames containing colons.
Diffstat (limited to 'winsup/utils/dump_setup.cc')
-rw-r--r-- | winsup/utils/dump_setup.cc | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/winsup/utils/dump_setup.cc b/winsup/utils/dump_setup.cc index 320d69fab..4415954f9 100644 --- a/winsup/utils/dump_setup.cc +++ b/winsup/utils/dump_setup.cc @@ -48,21 +48,6 @@ find_tar_ext (const char *path) return 0; } -static char * -base (const char *s) -{ - if (!s) - return 0; - const char *rv = s; - while (*s) - { - if ((*s == '/' || *s == ':' || *s == '\\') && s[1]) - rv = s + 1; - s++; - } - return (char *) rv; -} - /* Parse a filename into package, version, and extension components. */ int parse_filename (const char *in_fn, fileparse& f) @@ -79,7 +64,7 @@ parse_filename (const char *in_fn, fileparse& f) strcpy (f.tail, fn + n); fn[n] = '\0'; f.pkg[0] = f.what[0] = '\0'; - p = base (fn); + p = fn; for (ver = p; *ver; ver++) if (*ver != '-') continue; |