Re: Redundant strlen(query) in get_rel_infos

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Redundant strlen(query) in get_rel_infos
Дата
Msg-id ZFxt5a/X7rhx0lKb@paquier.xyz
обсуждение исходный текст
Ответ на Redundant strlen(query) in get_rel_infos  (Peter Smith <smithpb2250@gmail.com>)
Ответы Re: Redundant strlen(query) in get_rel_infos
Список pgsql-hackers
On Thu, May 11, 2023 at 01:06:42PM +1000, Peter Smith wrote:
> While reviewing another patch to the file info.c, I noticed there seem
> to be some unnecessary calls to strlen(query) in get_rel_infos()
> function.
>
> i.e. The query is explicitly initialized to an empty string
> immediately prior, so why the strlen?

It just looks like this was copied from a surrounding area like
get_db_infos().  Keeping the code as it is is no big deal, either, but
yes we could just remove them and save the two calls.  So ok by me.
--
Michael

Вложения

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