summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera2019-04-11 02:28:50 +0000
committerAlvaro Herrera2019-04-11 02:31:40 +0000
commit65d857d92c418d732e3531a3761a32f2e352cb35 (patch)
tree823e15a3c83620c43cef7bccaede06a80cc8c331
parent4cae471d1b6bec7493dcb2ca156382bef738f293 (diff)
Fix declaration after statement
This style is frowned upon. I inadvertently introduced one in commit fe0e0b4fc7f0. (My compiler does not complain about it, even though -Wdeclaration-after-statement is specified. Weird.) Author: Masahiko Sawada
-rw-r--r--src/bin/pgbench/pgbench.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index b67ad5e823..e0ac131a0e 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -2725,9 +2725,11 @@ readCommandResponse(CState *st, char *varprefix)
while (res != NULL)
{
- /* look now at the next result to know whether it is the last */
+ bool is_last;
+
+ /* peek at the next result to know whether the current is last */
next_res = PQgetResult(st->con);
- bool is_last = (next_res == NULL);
+ is_last = (next_res == NULL);
switch (PQresultStatus(res))
{