Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0 - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0
Date
Msg-id CAA4eK1K0wah2PJOqAmG=5gmMymn3ac77QYy+bvgf6KXqA-rLRw@mail.gmail.com
Whole thread Raw
In response to Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0  (Bruce Momjian <bruce@momjian.us>)
Responses Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Thu, Apr 10, 2014 at 5:21 PM, Bruce Momjian <bruce@momjian.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



pgsql-hackers by date:

Previous
From: Leon Smith
Date:
Subject: Re: Adding unsigned 256 bit integers
Next
From: Amit Kapila
Date:
Subject: Re: [BUG FIX] Compare returned value by socket() against PGINVALID_SOCKET instead of < 0