Re: [psqlODBC 08.02.0401] Typo

Lists: pgsql-odbc
From: Rainer Bauer <usenet(at)munnin(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: [psqlODBC 08.02.0401] Typo
Date: 2007-06-01 10:29:02
Message-ID: 22tv539amc962jer1c6dujom5g31761uhh@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

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


From: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
To: Rainer Bauer <usenet(at)munnin(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: [psqlODBC 08.02.0401] Typo
Date: 2007-06-01 21:52:44
Message-ID: 4660952C.9060002@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-odbc

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