aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-exec.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-04-16 19:46:51 -0400
committerBruce Momjian <bruce@momjian.us>2014-04-16 19:46:51 -0400
commit5d305d86bd917723f09ab4f15c075d90586a210a (patch)
tree4a9a18e0e4c2a0df2263b68fc5e8aa5d8098dd87 /src/interfaces/libpq/fe-exec.c
parentbe5f7fff470066dc3ee655b25840733eb9006426 (diff)
downloadpostgresql-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-exec.c')
-rw-r--r--src/interfaces/libpq/fe-exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c
index 8ccf6d39ee2..50e4035781a 100644
--- a/src/interfaces/libpq/fe-exec.c
+++ b/src/interfaces/libpq/fe-exec.c
@@ -2549,7 +2549,7 @@ PQfn(PGconn *conn,
/* clear the error string */
resetPQExpBuffer(&conn->errorMessage);
- if (conn->sock < 0 || conn->asyncStatus != PGASYNC_IDLE ||
+ if (conn->sock == PGINVALID_SOCKET || conn->asyncStatus != PGASYNC_IDLE ||
conn->result != NULL)
{
printfPQExpBuffer(&conn->errorMessage,