From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ramsay Jones Subject: [PATCH] http.c: Spell the null pointer as NULL Date: Thu, 24 Oct 2013 21:17:19 +0100 Message-ID: <5269804F.2080800@ramsay1.demon.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Jeff King , GIT Mailing-list To: Junio C Hamano X-From: git-owner@vger.kernel.org Thu Oct 24 22:17:32 2013 Return-path: Envelope-to: gcvg-git-2@plane.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VZRLU-0004yq-Vg for gcvg-git-2@plane.gmane.org; Thu, 24 Oct 2013 22:17:29 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755514Ab3JXURY (ORCPT ); Thu, 24 Oct 2013 16:17:24 -0400 Received: from mdfmta005.mxout.tbr.inty.net ([91.221.168.46]:48116 "EHLO smtp.demon.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753940Ab3JXURY (ORCPT ); Thu, 24 Oct 2013 16:17:24 -0400 Received: from mdfmta005.tbr.inty.net (unknown [127.0.0.1]) by mdfmta005.tbr.inty.net (Postfix) with ESMTP id F1FD6A64B7B; Thu, 24 Oct 2013 21:17:21 +0100 (BST) Received: from mdfmta005.tbr.inty.net (unknown [127.0.0.1]) by mdfmta005.tbr.inty.net (Postfix) with ESMTP id C24F3A64B99; Thu, 24 Oct 2013 21:17:21 +0100 (BST) Received: from [192.168.254.15] (unknown [80.176.147.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mdfmta005.tbr.inty.net (Postfix) with ESMTP; Thu, 24 Oct 2013 21:17:21 +0100 (BST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 X-MDF-HostID: 8 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: 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 --- Hi Junio, This is a repost of: http://article.gmane.org/gmane.comp.version-control.git/236201 I suspect that this simply fell through the cracks ... (if not, please let me know ;-) ATB, Ramsay Jones http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http.c b/http.c index 96d7578..b133ffd 100644 --- a/http.c +++ b/http.c @@ -1045,7 +1045,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; -- 1.8.4