Re: [PATCH] commit-graph: fix some "plain integer as NULL pointer" warnings
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 26, 2018, 14:31 UTC
- Message-ID
- <968481f1-dbda-502b-0c6f-41b0232fe870@gmail.com>
- In-Reply-To
- <93d2329a-1963-dca8-2f9e-ba225ead9d0b@web.de>
On 2/24/2018 12:42 AM, René Scharfe wrote:
Show 17 quoted lines
> Am 24.02.2018 um 03:24 schrieb Ramsay Jones:
>> 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éThanks for the feedback! I will apply these locally as I am re-rolling today.
-Stolee