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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user