From 5d305d86bd917723f09ab4f15c075d90586a210a Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 16 Apr 2014 19:46:51 -0400 Subject: 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 --- src/interfaces/libpq/fe-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/interfaces/libpq/fe-exec.c') diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index 8ccf6d39ee..50e4035781 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, -- cgit v1.2.1