diff options
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2013-10-24 21:17:19 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-24 14:42:26 -0700 |
commit | 70900eda4a0ed473ab5a933940285ac3dda698c0 (patch) | |
tree | c351495dab398dcb66240456cd89f4a6a12ed58f | |
parent | remote-curl: rewrite base url from info/refs redirects (diff) | |
download | tgif-70900eda4a0ed473ab5a933940285ac3dda698c0.tar.xz |
http.c: Spell the null pointer as NULL
Commit 1bbcc224 ("http: refactor options to http_get_*", 28-09-2013)
changed the type of final 'options' argument of the http_get_file()
function from an int to an 'struct http_get_options' pointer.
However, it neglected to update the (single) call site. Since this
call was passing '0' to that argument, it was (correctly) being
interpreted as a null pointer. Change to argument to NULL.
Noticed by sparse. ("Using plain integer as NULL pointer")
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jeff King <peff@peff.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | http.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1072,7 +1072,7 @@ static char *fetch_pack_index(unsigned char *sha1, const char *base_url) strbuf_addf(&buf, "%s.temp", sha1_pack_index_name(sha1)); tmp = strbuf_detach(&buf, NULL); - if (http_get_file(url, tmp, 0) != HTTP_OK) { + if (http_get_file(url, tmp, NULL) != HTTP_OK) { error("Unable to get pack index %s", url); free(tmp); tmp = NULL; |