From d732b0c76950bfdeaa9777bfac0c73517c25a9e0 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 26 Oct 2014 10:07:12 +0000 Subject: Remove unused url_scheme function. --- utils/url.c | 23 ----------------------- utils/url.h | 12 ------------ 2 files changed, 35 deletions(-) diff --git a/utils/url.c b/utils/url.c index 949478efb..c7935b279 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_scheme(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.scheme) { - status = NSERROR_NOT_FOUND; - } else { - *result = strdup(components.scheme); - if (!(*result)) - status = NSERROR_NOMEM; - } - } - url_destroy_components(&components); - return status; -} - - /* exported interface documented in utils/url.h */ nserror url_path(const char *url, char **result) { diff --git a/utils/url.h b/utils/url.h index aac4e57e4..d152cc1dd 100644 --- a/utils/url.h +++ b/utils/url.h @@ -65,18 +65,6 @@ nserror url_init(void); bool url_host_is_ip_address(const char *host); -/** - * Return the scheme name from an URL. - * - * See RFC 3986, 3.1 for reference. - * - * \param url an absolute URL - * \param result pointer to pointer to buffer to hold scheme name - * \return NSERROR_OK on success - */ -nserror url_scheme(const char *url, char **result); - - /** * Attempt to find a nice filename for a URL. * -- cgit v1.2.3