Обсуждение: [psqlODBC 08.02.0401] Typo

Поиск
Список
Период
Сортировка

[psqlODBC 08.02.0401] Typo

От
Rainer Bauer
Дата:
Hi,

while browsing the source I found a typo in socket.c::SOCK_Constructor()

Original code:
        if (rv)
            rv->buffer_size =
conn->connInfo.drivers.socket_buffersize;
        else
            rv->buffer_size = globals.socket_buffersize;

But since rv is allocated and checked before, the test should probably be:
        if (conn)
            rv->buffer_size =
conn->connInfo.drivers.socket_buffersize;
        else
            rv->buffer_size = globals.socket_buffersize;

Rainer

Re: [psqlODBC 08.02.0401] Typo

От
Hiroshi Inoue
Дата:
Rainer Bauer wrote:
> Hi,
>
> while browsing the source I found a typo in socket.c::SOCK_Constructor()
>
> Original code:
>         if (rv)
>             rv->buffer_size =
> conn->connInfo.drivers.socket_buffersize;
>         else
>             rv->buffer_size = globals.socket_buffersize;
>
> But since rv is allocated and checked before, the test should probably be:
>         if (conn)
>             rv->buffer_size =
> conn->connInfo.drivers.socket_buffersize;
>         else
>             rv->buffer_size = globals.socket_buffersize;

Oops you are right.
Thanks.

regards,
Hiroshi Inoue