1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-20 05:16:09 +02:00

Use local structs for HTTP slot callback data

There's no need for these structures to be static, and it could potentially
cause problems down the road.

Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Nick Hengeveld 2006-01-31 18:00:37 -08:00 committed by Junio C Hamano
parent 8233340ce6
commit cb754fdf5a

View File

@ -375,7 +375,7 @@ static int fetch_index(struct alt_base *repo, unsigned char *sha1)
FILE *indexfile; FILE *indexfile;
struct active_request_slot *slot; struct active_request_slot *slot;
static struct slot_results results; struct slot_results results;
if (has_pack_index(sha1)) if (has_pack_index(sha1))
return 0; return 0;
@ -555,7 +555,7 @@ static void fetch_alternates(char *base)
char *url; char *url;
char *data; char *data;
struct active_request_slot *slot; struct active_request_slot *slot;
static struct alternates_request alt_req; struct alternates_request alt_req;
/* If another request has already started fetching alternates, /* If another request has already started fetching alternates,
wait for them to arrive and return to processing this request's wait for them to arrive and return to processing this request's
@ -618,7 +618,7 @@ static int fetch_indices(struct alt_base *repo)
int i = 0; int i = 0;
struct active_request_slot *slot; struct active_request_slot *slot;
static struct slot_results results; struct slot_results results;
if (repo->got_indices) if (repo->got_indices)
return 0; return 0;
@ -699,7 +699,7 @@ static int fetch_pack(struct alt_base *repo, unsigned char *sha1)
struct curl_slist *range_header = NULL; struct curl_slist *range_header = NULL;
struct active_request_slot *slot; struct active_request_slot *slot;
static struct slot_results results; struct slot_results results;
if (fetch_indices(repo)) if (fetch_indices(repo))
return -1; return -1;
@ -900,7 +900,7 @@ int fetch_ref(char *ref, unsigned char *sha1)
struct buffer buffer; struct buffer buffer;
char *base = alt->base; char *base = alt->base;
struct active_request_slot *slot; struct active_request_slot *slot;
static struct slot_results results; struct slot_results results;
buffer.size = 41; buffer.size = 41;
buffer.posn = 0; buffer.posn = 0;
buffer.buffer = hex; buffer.buffer = hex;