diff options
author | Bruce Momjian <bruce@momjian.us> | 2014-04-16 19:46:51 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2014-04-16 19:46:51 -0400 |
commit | 5d305d86bd917723f09ab4f15c075d90586a210a (patch) | |
tree | 4a9a18e0e4c2a0df2263b68fc5e8aa5d8098dd87 /src/interfaces/libpq/fe-protocol3.c | |
parent | be5f7fff470066dc3ee655b25840733eb9006426 (diff) | |
download | postgresql-5d305d86bd917723f09ab4f15c075d90586a210a.tar.gz postgresql-5d305d86bd917723f09ab4f15c075d90586a210a.zip |
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
Diffstat (limited to 'src/interfaces/libpq/fe-protocol3.c')
-rw-r--r-- | src/interfaces/libpq/fe-protocol3.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 47cd7f487f0..d895589148c 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -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) |