http: make curl callbacks match contracts from curl header
Yes, these don't match perfectly with the void* first parameter of the fread/fwrite in the standard library, but they do match the curl expected method signature. This is needed when a refactor passes a curl_write_callback around, which would otherwise give incorrect parameter warnings. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
11c3e2b7bd
commit
a04ff3ec32
@ -185,7 +185,7 @@ static void process_alternates_response(void *callback_data)
|
||||
struct active_request_slot *slot = alt_req->slot;
|
||||
struct alt_base *tail = cdata->alt;
|
||||
const char *base = alt_req->base;
|
||||
static const char null_byte = '\0';
|
||||
const char null_byte = '\0';
|
||||
char *data;
|
||||
int i = 0;
|
||||
|
||||
@ -218,7 +218,7 @@ static void process_alternates_response(void *callback_data)
|
||||
}
|
||||
}
|
||||
|
||||
fwrite_buffer(&null_byte, 1, 1, alt_req->buffer);
|
||||
fwrite_buffer((char *)&null_byte, 1, 1, alt_req->buffer);
|
||||
alt_req->buffer->len--;
|
||||
data = alt_req->buffer->buf;
|
||||
|
||||
|
Reference in New Issue
Block a user