Skip to content

Commit 70900ed

Browse files
Ramsay Jonesgitster
authored andcommitted
http.c: Spell the null pointer as NULL
Commit 1bbcc22 ("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 <[email protected]> Acked-by: Jeff King <[email protected]> Reviewed-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 050ef36 commit 70900ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ static char *fetch_pack_index(unsigned char *sha1, const char *base_url)
10721072
strbuf_addf(&buf, "%s.temp", sha1_pack_index_name(sha1));
10731073
tmp = strbuf_detach(&buf, NULL);
10741074

1075-
if (http_get_file(url, tmp, 0) != HTTP_OK) {
1075+
if (http_get_file(url, tmp, NULL) != HTTP_OK) {
10761076
error("Unable to get pack index %s", url);
10771077
free(tmp);
10781078
tmp = NULL;

0 commit comments

Comments
 (0)