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-protocol2.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-protocol2.c')
-rw-r--r-- | src/interfaces/libpq/fe-protocol2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index f3fddaa0364..10510b5bf5a 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -1211,7 +1211,7 @@ pqGetline2(PGconn *conn, char *s, int maxlen) { int result = 1; /* return value if buffer overflows */ - if (conn->sock < 0 || + if (conn->sock == PGINVALID_SOCKET || conn->asyncStatus != PGASYNC_COPY_OUT) { *s = '\0'; |