Re: Some doubious code in pgstat.c

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Some doubious code in pgstat.c
Дата
Msg-id 20201109.114851.1227268334207745776.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Some doubious code in pgstat.c  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
At Fri, 6 Nov 2020 16:40:39 +0530, Amit Kapila <amit.kapila16@gmail.com> wrote in 
> On Thu, Nov 5, 2020 at 2:13 PM Kyotaro Horiguchi
> <horikyota.ntt@gmail.com> wrote:
> >
> > At Thu, 5 Nov 2020 11:48:24 +0530, Amit Kapila <amit.kapila16@gmail.com> wrote in
> > > On Thu, Nov 5, 2020 at 9:44 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> > > >
> > > > On Thu, Nov 5, 2020 at 11:18 AM Kyotaro Horiguchi
> > > > <horikyota.ntt@gmail.com> wrote:
> > > > > As another issue, just replace memcpy with strlcpy makes compiler
> > > > > complain of type mismatch, as the first paramter to memcpy had an
> > > > > needless "&" operator. I removed it in this patch.
> > > > >
> > > > > (&msg.m_slotname is a "char (*)[NAMEDATALEN]", not a "char *".)
> > > > >
> > > >
> > > > The patch looks good to me.
> > > >
> > >
> > > LGTM as well but the proposed commit message seems to be a bit
> > > unclear. How about something like this:
> > > "Use strlcpy instead of memcpy for copying the slot name in pgstat.c.
> > >
> > > There is no outright bug here but it is better to be consistent with
> > > the usage at other places in the same file. In the passing, fix a wrong
> > > Assertion in pgstat_recv_replslot."
> >
> > Looks better, thanks.
> >
> 
> Pushed!

Thanks!

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Protect syscache from bloating with negative cache entries
Следующее
От: "osumi.takamichi@fujitsu.com"
Дата:
Сообщение: RE: extension patch of CREATE OR REPLACE TRIGGER