http: drop http_error function
This function is a single-liner and is only called from one place. Just inline it, which makes the code more obvious. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jeff King committed
Apr 5, 2013 at 18:22 UTC
4df13f69e9facbd09a2b06478e8c40082cda7ce6
3 files changed
+1
-11
http-push.c
+1
-1
@@ -1551,7 +1551,7 @@ static int remote_exists(const char *path)
1551
ret = 0;
1552
break;
1553
case HTTP_ERROR:
1554
- http_error(url);
1554
+ error("unable to access '%s': %s", url, curl_errorstr);
1555
default:
1556
ret = -1;
1557
}
http.c
-5
@@ -941,11 +941,6 @@ cleanup:
941
return ret;
942
}
943
944
-void http_error(const char *url)
945
-{
946
- error("unable to access '%s': %s", url, curl_errorstr);
947
-}
948
-
944
int http_fetch_ref(const char *base, struct ref *ref)
945
{
946
char *url;
http.h
-5
@@ -135,11 +135,6 @@ extern char *get_remote_object_url(const char *url, const char *hex,
135
*/
136
int http_get_strbuf(const char *url, struct strbuf *content_type, struct strbuf *result, int options);
137
138
-/*
139
- * Prints an error message using error() containing url and curl_errorstr.
140
- */
141
-void http_error(const char *url);
142
-
138
extern int http_fetch_ref(const char *base, struct ref *ref);
139
140
/* Helpers for fetching packs */