From 1ccfcfe953d9a5144746bfafcf5d37a8229ca998 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 26 Oct 2014 10:21:27 +0000 Subject: Remove unused url_path function. --- utils/url.c | 23 ----------------------- utils/url.h | 10 ---------- 2 files changed, 33 deletions(-) (limited to 'utils') diff --git a/utils/url.c b/utils/url.c index c7935b279..d1b6805b5 100644 --- a/utils/url.c +++ b/utils/url.c @@ -287,29 +287,6 @@ static void url_destroy_components(const struct url_components *components) } -/* exported interface documented in utils/url.h */ -nserror url_path(const char *url, char **result) -{ - nserror status; - struct url_components components; - - assert(url); - - status = url_get_components(url, &components); - if (status == NSERROR_OK) { - if (!components.path) { - status = NSERROR_NOT_FOUND; - } else { - *result = strdup(components.path); - if (!(*result)) - status = NSERROR_NOMEM; - } - } - url_destroy_components(&components); - return status; -} - - /* exported interface documented in utils/url.h */ nserror url_nice(const char *url, char **result, bool remove_extensions) diff --git a/utils/url.h b/utils/url.h index d152cc1dd..9f8de4e48 100644 --- a/utils/url.h +++ b/utils/url.h @@ -95,14 +95,4 @@ nserror url_escape(const char *unescaped, size_t toskip, bool sptoplus, const ch */ nserror url_unescape(const char *str, char **result); - -/** - * Extract path segment from an URL - * - * \param url an absolute URL - * \param result pointer to pointer to buffer to hold result - * \return NSERROR_OK on success - */ -nserror url_path(const char *url, char **result); - #endif -- cgit v1.2.3