Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Joel Jacobson <joel(at)trustly(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0
Date: 2014-04-11 04:30:03
Message-ID: CAA4eK1K0wah2PJOqAmG=5gmMymn3ac77QYy+bvgf6KXqA-rLRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 10, 2014 at 5:21 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Thu, Apr 10, 2014 at 11:05:49AM +0530, Amit Kapila wrote:

> Ah, yes, good point. This is going to require backpatching then.

I also think so.

>> I think it's better to use check like below, just for matter of
>> consistency with other place
>> if (sock == INVALID_SOCKET)
>
> Agreed. That is how I have coded the patch.

Sorry, I didn't checked the latest patch before that comment.

I verified that your last patch is fine. Regression test also went fine.

With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-04-11 04:33:08 Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0
Previous Message Leon Smith 2014-04-11 04:27:47 Re: Adding unsigned 256 bit integers