Re: [HACKERS] macaddr 64 bit (EUI-64) datatype support

Поиск
Список
Период
Сортировка
От Vitaly Burovoy
Тема Re: [HACKERS] macaddr 64 bit (EUI-64) datatype support
Дата
Msg-id CAKOSWNmz3iBh_KebSi9d0p73oDWKaGcj_TUzQQoN2YsJcMRokA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] macaddr 64 bit (EUI-64) datatype support  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Ответы Re: [HACKERS] macaddr 64 bit (EUI-64) datatype support  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-hackers
On 1/25/17, Haribabu Kommi <kommi.haribabu@gmail.com> wrote:
> On Wed, Jan 25, 2017 at 6:43 PM, Vitaly Burovoy <vitaly.burovoy@gmail.com>
> wrote:
>
>> On 1/23/17, Haribabu Kommi <kommi.haribabu@gmail.com> wrote:
>> > The patch is split into two parts.
>> > 1. Macaddr8 datatype support
>> > 2. Contrib module support.
>>
>> Hello,
>>
>> I'm sorry for the delay.
>> The patch is almost done, but I have two requests since the last review.
>>
>
> Thanks for the review.
>
>
>> 1.
>> src/backend/utils/adt/mac8.c:
>> +       int                     a,
>> +                               b,
>> +                               c,
>> +                               d = 0,
>> +                               e = 0,
>> ...
>>
>> There is no reason to set them as 0. For EUI-48 they will be
>> reassigned in the "if (count != 8)" block, for EUI-64 -- in one of
>> sscanf.
>> They could be set to "d = 0xFF, e = 0xFE," and avoid the "if" block
>> mentioned above, but it makes the code be much less readable.
>>

<overquoted>

>
> Changed accordingly.

I'm going to do (I hope) a final review tonight.
Please, remove initialization of the variables "d" and "e" since there
is really no reason to keep them be zero for a short time.

-- 
Best regards,
Vitaly Burovoy



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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] logical decoding of two-phase transactions
Следующее
От: Emre Hasegeli
Дата:
Сообщение: Re: [HACKERS] Floating point comparison inconsistencies of thegeometric types