Re: Cleanup: Replace sscanf with strtol/strtoul in snapmgr

Поиск
Список
Период
Сортировка
От Tristan Partin
Тема Re: Cleanup: Replace sscanf with strtol/strtoul in snapmgr
Дата
Msg-id DIAVABAZIYEG.371CCRMOFWC6Z@partin.io
обсуждение
Ответ на Re: Cleanup: Replace sscanf with strtol/strtoul in snapmgr  (Amul Sul <sulamul@gmail.com>)
Список pgsql-hackers
On Tue May 5, 2026 at 2:24 AM CDT, Amul Sul wrote:
> On Mon, May 4, 2026 at 9:19 PM Tristan Partin <tristan@partin.io> wrote:
>>
>> On Mon Apr 20, 2026 at 12:07 AM CDT, Amul Sul wrote:
>> The patch generally looks good. One comment:
>>
>> > @@ -1359,17 +1365,36 @@ parseVxidFromText(const char *prefix, char **s, const char *filename,
>> >  {
>> >         char       *ptr = *s;
>> >         int                     prefixlen = strlen(prefix);
>> > +       long            lval;
>> > +       unsigned long ulval;
>>
>> Perhaps better variable names would be procNumber and
>> localTransactionId.
>>
>
> Thanks, Andreas and Tristan, for the review !
>
> I have renamed the variables as suggested but used the shorter forms
> procno and xid instead of procNumber and localTransactionId. I also
> applied similar changes to parseXidFromText (changing val to xid), but
> kept val in parseIntFromText since it seems to be more appropriate for
> a generic integer value.
>
> Updated patch attached.

New patch looks good to me. I can confirm that the only changes in the
new version of the patch are the variable names.

--
Tristan Partin
PostgreSQL Contributors Team
AWS (https://aws.amazon.com)



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