git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix a "Using plain integer as NULL pointer" sparse warning

From
Jeff King <peff@peff.net>
Date
Apr 3, 2012, 20:27 UTC
Message-ID
<20120403202706.GA24815@sigill.intra.peff.net>
In-Reply-To
<4F7B331E.5080604@ramsay1.demon.co.uk>
On Tue, Apr 03, 2012 at 06:27:58PM +0100, Ramsay Jones wrote:
> If you need to re-roll your run-command patch [commit b0984f82,
> "run-command: treat inaccessible directories as ENOENT", 30-03-2012],
> could you please squash this patch into it. Thanks!

I don't think it needs re-rolled, but it hasn't hit next yet. Junio, can you squash this in?

Show 10 quoted lines
> diff --git a/run-command.c b/run-command.c
> index 47afb78..ae72b9b 100644
> --- a/run-command.c
> +++ b/run-command.c
> @@ -86,7 +86,7 @@ static char *locate_in_PATH(const char *file)
>  	struct strbuf buf = STRBUF_INIT;
>  
>  	if (!p || !*p)
> -		return 0;
> +		return NULL;

I missed this when converting the code from "is there anything in path" to "here is what there is in path".

-Peff
Previous: Ramsay Jones
Message 2 of 2 in “Fix a "Using plain integer as NULL pointer" sparse warning”
  1. Fix a "Using plain integer as NULL pointer" sparse warningRamsay Jones, Apr 3, 2012
  2. Jeff KingApr 3, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.