summaryrefslogtreecommitdiff
path: root/http-walker.c
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2011-05-03 15:47:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-04 20:30:28 (GMT)
commita04ff3ec32b8a998a18f8b515ae4c48c1846b327 (patch)
tree0092c5d022ca90da22cf516d589cb8ce4b0f1f5b /http-walker.c
parent11c3e2b7bd617334e7730950166188e94e003f2b (diff)
downloadgit-a04ff3ec32b8a998a18f8b515ae4c48c1846b327.zip
git-a04ff3ec32b8a998a18f8b515ae4c48c1846b327.tar.gz
git-a04ff3ec32b8a998a18f8b515ae4c48c1846b327.tar.bz2
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>
Diffstat (limited to 'http-walker.c')
-rw-r--r--http-walker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http-walker.c b/http-walker.c
index 9bc8114..51a906e 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -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;