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

Re: [PATCH] commit-graph: fix some "plain integer as NULL pointer" warnings

From
René Scharfe <l.s.r@web.de>
Date
Feb 24, 2018, 05:42 UTC
Message-ID
<93d2329a-1963-dca8-2f9e-ba225ead9d0b@web.de>
In-Reply-To
<e0bc5fe0-3b32-bebf-11cd-e335a8cf4e1c@ramsayjones.plus.com>
Am 24.02.2018 um 03:24 schrieb Ramsay Jones:
Show 11 quoted lines
> diff --git a/commit-graph.c b/commit-graph.c
> index fc5ee7e99..c2f443436 100644
> --- a/commit-graph.c
> +++ b/commit-graph.c
> @@ -45,7 +45,7 @@ char *get_graph_latest_filename(const char *obj_dir)
>   {
>   	struct strbuf fname = STRBUF_INIT;
>   	strbuf_addf(&fname, "%s/info/graph-latest", obj_dir);
> -	return strbuf_detach(&fname, 0);
> +	return strbuf_detach(&fname, NULL);
>   }
You could also replace that function body with:
	return xstrfmt("%s/info/graph-latest", obj_dir);
René
Previous: Ramsay JonesNext: Derrick Stolee
Message 2 of 3 in “commit-graph: fix some "plain integer as NULL pointer" warnings”
  1. commit-graph: fix some "plain integer as NULL pointer" warningsRamsay Jones, Feb 24, 2018
  2. René ScharfeFeb 24, 2018
  3. Derrick StoleeFeb 26, 2018

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.