git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] Cleanup variables in http.[ch]
@ 2007-12-09 17:04 Mike Hommey
  2007-12-09 17:04 ` [PATCH 2/4] Use strbuf in http code Mike Hommey
                   ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Mike Hommey @ 2007-12-09 17:04 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

Quite some variables defined as extern in http.h are only used in http.c,
and some others, only defined in http.c, were not static. Cleanup that.

Signed-off-by: Mike Hommey <mh@glandium.org>
---
 http.c |   28 ++++++++++++++--------------
 http.h |   18 ------------------
 2 files changed, 14 insertions(+), 32 deletions(-)

diff --git a/http.c b/http.c
index e4aa9c1..146f626 100644
--- a/http.c
+++ b/http.c
@@ -4,31 +4,31 @@ int data_received;
 int active_requests = 0;
 
 #ifdef USE_CURL_MULTI
-int max_requests = -1;
-CURLM *curlm;
+static int max_requests = -1;
+static CURLM *curlm;
 #endif
 #ifndef NO_CURL_EASY_DUPHANDLE
-CURL *curl_default;
+static CURL *curl_default;
 #endif
 char curl_errorstr[CURL_ERROR_SIZE];
 
-int curl_ssl_verify = -1;
-char *ssl_cert = NULL;
+static int curl_ssl_verify = -1;
+static char *ssl_cert = NULL;
 #if LIBCURL_VERSION_NUM >= 0x070902
-char *ssl_key = NULL;
+static char *ssl_key = NULL;
 #endif
 #if LIBCURL_VERSION_NUM >= 0x070908
-char *ssl_capath = NULL;
+static char *ssl_capath = NULL;
 #endif
-char *ssl_cainfo = NULL;
-long curl_low_speed_limit = -1;
-long curl_low_speed_time = -1;
-int curl_ftp_no_epsv = 0;
-char *curl_http_proxy = NULL;
+static char *ssl_cainfo = NULL;
+static long curl_low_speed_limit = -1;
+static long curl_low_speed_time = -1;
+static int curl_ftp_no_epsv = 0;
+static char *curl_http_proxy = NULL;
 
-struct curl_slist *pragma_header;
+static struct curl_slist *pragma_header;
 
-struct active_request_slot *active_queue_head = NULL;
+static struct active_request_slot *active_queue_head = NULL;
 
 size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb,
 			   struct buffer *buffer)
diff --git a/http.h b/http.h
index 72abac2..fe1b0d1 100644
--- a/http.h
+++ b/http.h
@@ -80,24 +80,6 @@ extern void http_cleanup(void);
 extern int data_received;
 extern int active_requests;
 
-#ifndef NO_CURL_EASY_DUPHANDLE
-extern CURL *curl_default;
-#endif
 extern char curl_errorstr[CURL_ERROR_SIZE];
 
-extern int curl_ssl_verify;
-extern char *ssl_cert;
-#if LIBCURL_VERSION_NUM >= 0x070902
-extern char *ssl_key;
-#endif
-#if LIBCURL_VERSION_NUM >= 0x070908
-extern char *ssl_capath;
-#endif
-extern char *ssl_cainfo;
-extern long curl_low_speed_limit;
-extern long curl_low_speed_time;
-
-extern struct curl_slist *pragma_header;
-extern struct curl_slist *no_range_header;
-
 #endif /* HTTP_H */
-- 
1.5.3.7

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2007-12-11  6:26 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-09 17:04 [PATCH 1/4] Cleanup variables in http.[ch] Mike Hommey
2007-12-09 17:04 ` [PATCH 2/4] Use strbuf in http code Mike Hommey
2007-12-09 17:04   ` [PATCH 3/4] Move the file read logic to read_patch_file() in builtin-apply.c Mike Hommey
2007-12-09 17:05     ` [PATCH 4/4] Add support for URLs to git-apply Mike Hommey
2007-12-10  9:06       ` [Replacement PATCH " Mike Hommey
2007-12-09 18:27     ` [PATCH 3/4] Move the file read logic to read_patch_file() in builtin-apply.c Junio C Hamano
2007-12-09 18:15   ` [PATCH 2/4] Use strbuf in http code Junio C Hamano
2007-12-09 18:24     ` Mike Hommey
2007-12-09 18:36       ` Junio C Hamano
2007-12-09 19:30         ` [Resend PATCH " Mike Hommey
2007-12-11  6:04           ` Junio C Hamano
2007-12-11  6:16             ` Mike Hommey
2007-12-11  6:25               ` [Replacement " Mike Hommey
2007-12-09 17:17 ` [PATCH] git-send-email.perl: Really add angle brackets to In-Reply-To if necessary Mike Hommey
2007-12-09 17:38   ` Mike Hommey
2007-12-09 18:09   ` Junio C Hamano
2007-12-09 18:14     ` Mike Hommey
2007-12-09 18:21     ` David Kastrup
2007-12-09 18:53       ` Randal L. Schwartz
2007-12-09 19:46         ` David Kastrup
2007-12-09 19:51           ` Randal L. Schwartz
2007-12-09 19:58             ` [Resend PATCH] " Mike Hommey
2007-12-09 18:21 ` [PATCH 1/4] Cleanup variables in http.[ch] Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).