From: Michael Tremer Date: Sat, 2 Sep 2023 10:03:35 +0000 (+0000) Subject: util: Drop unused pakfire_path_abspath function X-Git-Tag: 0.9.29~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d208f8ba73e816ed8d3b5903457a3cb08a63c50e;p=pakfire.git util: Drop unused pakfire_path_abspath function Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/include/pakfire/util.h b/src/libpakfire/include/pakfire/util.h index 184f1558d..ef835a112 100644 --- a/src/libpakfire/include/pakfire/util.h +++ b/src/libpakfire/include/pakfire/util.h @@ -65,7 +65,6 @@ int __pakfire_unhexlify(unsigned char* dst, const size_t l, const char* src); int __pakfire_path_join(char* dest, const size_t length, const char* first, const char* second); int pakfire_path_is_absolute(const char* path); -const char* pakfire_path_abspath(const char* path); const char* pakfire_path_relpath(const char* root, const char* path); #define pakfire_path_realpath(dest, path) \ diff --git a/src/libpakfire/util.c b/src/libpakfire/util.c index 090be50e1..3fb0b4207 100644 --- a/src/libpakfire/util.c +++ b/src/libpakfire/util.c @@ -103,29 +103,6 @@ int pakfire_path_is_absolute(const char* path) { return (*path == '/'); } -const char* pakfire_path_abspath(const char* path) { - static char buffer[PATH_MAX]; - int r; - - // Check input - if (!path) { - errno = EINVAL; - return NULL; - } - - // Return path if already absolute - if (*path == '/') - return path; - - // Otherwise prepend a / - r = pakfire_string_format(buffer, "/%s", path); - if (r) - return NULL; - - // Return a reference to the buffer - return buffer; -} - const char* pakfire_path_relpath(const char* root, const char* path) { // Check inputs if (!root || !path) {