Skip to content

Commit cc3530e

Browse files
glandiumgitster
authored andcommitted
Cleanup variables in http.[ch]
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. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ace7208 commit cc3530e

File tree

2 files changed

+14
-32
lines changed

2 files changed

+14
-32
lines changed

http.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ int data_received;
44
int active_requests = 0;
55

66
#ifdef USE_CURL_MULTI
7-
int max_requests = -1;
8-
CURLM *curlm;
7+
static int max_requests = -1;
8+
static CURLM *curlm;
99
#endif
1010
#ifndef NO_CURL_EASY_DUPHANDLE
11-
CURL *curl_default;
11+
static CURL *curl_default;
1212
#endif
1313
char curl_errorstr[CURL_ERROR_SIZE];
1414

15-
int curl_ssl_verify = -1;
16-
char *ssl_cert = NULL;
15+
static int curl_ssl_verify = -1;
16+
static char *ssl_cert = NULL;
1717
#if LIBCURL_VERSION_NUM >= 0x070902
18-
char *ssl_key = NULL;
18+
static char *ssl_key = NULL;
1919
#endif
2020
#if LIBCURL_VERSION_NUM >= 0x070908
21-
char *ssl_capath = NULL;
21+
static char *ssl_capath = NULL;
2222
#endif
23-
char *ssl_cainfo = NULL;
24-
long curl_low_speed_limit = -1;
25-
long curl_low_speed_time = -1;
26-
int curl_ftp_no_epsv = 0;
27-
char *curl_http_proxy = NULL;
23+
static char *ssl_cainfo = NULL;
24+
static long curl_low_speed_limit = -1;
25+
static long curl_low_speed_time = -1;
26+
static int curl_ftp_no_epsv = 0;
27+
static char *curl_http_proxy = NULL;
2828

29-
struct curl_slist *pragma_header;
29+
static struct curl_slist *pragma_header;
3030

31-
struct active_request_slot *active_queue_head = NULL;
31+
static struct active_request_slot *active_queue_head = NULL;
3232

3333
size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb,
3434
struct buffer *buffer)

http.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,6 @@ extern void http_cleanup(void);
8080
extern int data_received;
8181
extern int active_requests;
8282

83-
#ifndef NO_CURL_EASY_DUPHANDLE
84-
extern CURL *curl_default;
85-
#endif
8683
extern char curl_errorstr[CURL_ERROR_SIZE];
8784

88-
extern int curl_ssl_verify;
89-
extern char *ssl_cert;
90-
#if LIBCURL_VERSION_NUM >= 0x070902
91-
extern char *ssl_key;
92-
#endif
93-
#if LIBCURL_VERSION_NUM >= 0x070908
94-
extern char *ssl_capath;
95-
#endif
96-
extern char *ssl_cainfo;
97-
extern long curl_low_speed_limit;
98-
extern long curl_low_speed_time;
99-
100-
extern struct curl_slist *pragma_header;
101-
extern struct curl_slist *no_range_header;
102-
10385
#endif /* HTTP_H */

0 commit comments

Comments
 (0)