Re: useless assignment pointer argument

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: useless assignment pointer argument
Дата
Msg-id 20150528201659.GA26821@alap3.anarazel.de
обсуждение исходный текст
Ответ на useless assignment pointer argument  (Gaetano Mendola <mendola@gmail.com>)
Ответы Re: useless assignment pointer argument  (Gaetano Mendola <mendola@gmail.com>)
Re: useless assignment pointer argument  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2015-05-28 20:14:33 +0000, Gaetano Mendola wrote:
> src/backend/commands/explain.c:1692
> src/backend/commands/explain.c:1874
> src/backend/commands/explain.c:1986
> 
> there is the following assignment:
> 
>    ancestors = list_delete_first(ancestors);
> 
> but it has no effect at all being that a function parameter and not used
> anymore after the assignment itself.

So? It costs little to nothing, and it'll make it much less likely that
a stale version of 'ancestors' is used when the code is expanded.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gaetano Mendola
Дата:
Сообщение: useless assignment pointer argument
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: RFC: Remove contrib entirely