{"thread":{"id":"35194","subject":"[PATCH] http.c: Spell the null pointer as NULL","startedAt":"2013-10-24T20:17:19Z","lastAt":"2013-10-24T21:42:55Z","messageCount":3,"participants":["Ramsay Jones","Jonathan Nieder","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"229430","messageId":"5269804F.2080800@ramsay1.demon.co.uk","threadId":"35194","inReplyTo":null,"subject":"[PATCH] http.c: Spell the null pointer as NULL","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-10-24T20:17:19Z","receivedAt":"2013-10-24T20:17:19Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nCommit 1bbcc224 (\"http: refactor options to http_get_*\", 28-09-2013)\nchanged the type of final 'options' argument of the http_get_file()\nfunction from an int to an 'struct http_get_options' pointer.\nHowever, it neglected to update the (single) call site. Since this\ncall was passing '0' to that argument, it was (correctly) being\ninterpreted as a null pointer. Change to argument to NULL.\n\nNoticed by sparse. (\"Using plain integer as NULL pointer\")\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Junio,\n\nThis is a repost of:\n\n  http://article.gmane.org/gmane.comp.version-control.git/236201\n\nI suspect that this simply fell through the cracks ... (if not,\nplease let me know ;-)\n\nATB,\nRamsay Jones\n\n http.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/http.c b/http.c\nindex 96d7578..b133ffd 100644\n--- a/http.c\n+++ b/http.c\n@@ -1045,7 +1045,7 @@ static char *fetch_pack_index(unsigned char *sha1, const char *base_url)\n \tstrbuf_addf(&buf, \"%s.temp\", sha1_pack_index_name(sha1));\n \ttmp = strbuf_detach(&buf, NULL);\n \n-\tif (http_get_file(url, tmp, 0) != HTTP_OK) {\n+\tif (http_get_file(url, tmp, NULL) != HTTP_OK) {\n \t\terror(\"Unable to get pack index %s\", url);\n \t\tfree(tmp);\n \t\ttmp = NULL;\n-- \n1.8.4\n"},{"id":"229435","messageId":"20131024205817.GD9464@google.com","threadId":"35194","inReplyTo":"5269804F.2080800@ramsay1.demon.co.uk","subject":"Re: [PATCH] http.c: Spell the null pointer as NULL","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-10-24T20:58:17Z","receivedAt":"2013-10-24T20:58:17Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Ramsay Jones wrote:\n\n> Commit 1bbcc224 (\"http: refactor options to http_get_*\", 28-09-2013)\n> changed the type of final 'options' argument of the http_get_file()\n> function from an int to an 'struct http_get_options' pointer.\n> However, it neglected to update the (single) call site. Since this\n> call was passing '0' to that argument, it was (correctly) being\n> interpreted as a null pointer. Change to argument to NULL.\n\nJeff King wrote:\n\n> Thanks, patch is obviously correct (and the cause was just oversight on\n> my part).\n\nFor what it's worth, against the jk/http-auth-redirects branch,\n\nReviewed-by: Jonathan Nieder <jrnieder@gmail.com>\n"},{"id":"229444","messageId":"xmqq1u3amjkw.fsf@gitster.dls.corp.google.com","threadId":"35194","inReplyTo":"5269804F.2080800@ramsay1.demon.co.uk","subject":"Re: [PATCH] http.c: Spell the null pointer as NULL","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-10-24T21:42:55Z","receivedAt":"2013-10-24T21:42:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks.\n"}]}