/me does not like empty for loops

This commit is contained in:
Federico Di Gregorio 2010-04-05 11:07:19 +02:00
parent 53748443d8
commit 3f2c1f6489

View File

@ -294,11 +294,9 @@ pq_clear_async(connectionObject *conn)
many parts, i.e. "select 1; select 2", there will be many) and also many parts, i.e. "select 1; select 2", there will be many) and also
finalize asynchronous processing so the connection will be ready to finalize asynchronous processing so the connection will be ready to
accept another query */ accept another query */
for (;;) {
pgres = PQgetResult(conn->pgconn); while ((pgres = PQgetResult(conn->pgconn)) != NULL) {
Dprintf("pq_clear_async: clearing PGresult at %p", pgres); Dprintf("pq_clear_async: clearing PGresult at %p", pgres);
if (pgres == NULL)
break;
CLEARPGRES(pgres); CLEARPGRES(pgres);
} }
conn->async_cursor = NULL; conn->async_cursor = NULL;