Re: Duplicated assignment of slot_name in walsender.c

Поиск
Список
Период
Сортировка
От José Luis Tallón
Тема Re: Duplicated assignment of slot_name in walsender.c
Дата
Msg-id 5628DB10.1000603@adv-solutions.net
обсуждение исходный текст
Ответ на Re: Duplicated assignment of slot_name in walsender.c  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 10/22/2015 12:36 AM, Alvaro Herrera wrote:
> Andres Freund wrote:
>
>> That seems fairly insignificant. For one this is a rather infrequent and
>> expensive operation, for another every decent compiler can optimize
>> those away. Note that those duplicate strlen() calls are there in a lot
>> of places in walsender.c
> diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
> index c6043cd..5487cc0 100644
> --- a/src/backend/replication/walsender.c
> +++ b/src/backend/replication/walsender.c
> @@ -762,10 +762,10 @@ logical_read_xlog_page(XLogReaderState *state, XLogRecPtr targetPagePtr, int req
>   static void
>   CreateReplicationSlot(CreateReplicationSlotCmd *cmd)
>   {
> -    const char *slot_name;
>       const char *snapshot_name = NULL;
>       char        xpos[MAXFNAMELEN];
>       StringInfoData buf;
> +    int            len;

Surely    "size_t len" ?
Or am I missing some platform where size_t is not defined ?
    Minor nitpicking, of course. But once we are cleaning the code up, 
might as well change this too....


Thanks!
    / J.L.




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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH v3] GSSAPI encryption support
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Patch (2): Implement failover on libpq connect level.