1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-19 13:42:17 +03:00

libpq: use pgsocket for socket values, for portability

Previously, 'int' was used for socket values in libpq, but socket values
are unsigned on Windows.  This is a style correction.

Initial patch and previous PGINVALID_SOCKET initial patch by Joel
Jacobson, modified by me

Report from PVS-Studio
This commit is contained in:
Bruce Momjian
2014-04-16 19:46:51 -04:00
parent be5f7fff47
commit 5d305d86bd
6 changed files with 16 additions and 32 deletions

View File

@@ -1568,7 +1568,7 @@ pqGetline3(PGconn *conn, char *s, int maxlen)
{
int status;
if (conn->sock < 0 ||
if (conn->sock == PGINVALID_SOCKET ||
(conn->asyncStatus != PGASYNC_COPY_OUT &&
conn->asyncStatus != PGASYNC_COPY_BOTH) ||
conn->copy_is_binary)