Remove pgbench clientDone unused "ok" parameter.

I cannot get the point of keeping a useless parameter, which is probably there because at some point in the past it was used. If it is needed some day it can always be reinserted.

--
Fabien.
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index 4196b0e..1146e16 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -1314,10 +1314,8 @@ preparedStatementName(char *buffer, int file, int state)
 }
 
 static bool
-clientDone(CState *st, bool ok)
+clientDone(CState *st)
 {
-	(void) ok;					/* unused */
-
 	if (st->con != NULL)
 	{
 		PQfinish(st->con);
@@ -1388,7 +1386,7 @@ top:
 
 		/* stop client if next transaction is beyond pgbench end of execution */
 		if (duration > 0 && st->txn_scheduled > end_time)
-			return clientDone(st, true);
+			return clientDone(st);
 
 		/*
 		 * If this --latency-limit is used, and this slot is already late so
@@ -1441,7 +1439,7 @@ top:
 			if (!PQconsumeInput(st->con))
 			{					/* there's something wrong */
 				fprintf(stderr, "client %d aborted in state %d; perhaps the backend died while processing\n", st->id, st->state);
-				return clientDone(st, false);
+				return clientDone(st);
 			}
 			if (PQisBusy(st->con))
 				return true;	/* don't have the whole result yet */
@@ -1488,7 +1486,7 @@ top:
 					fprintf(stderr, "client %d aborted in state %d: %s",
 							st->id, st->state, PQerrorMessage(st->con));
 					PQclear(res);
-					return clientDone(st, false);
+					return clientDone(st);
 			}
 			PQclear(res);
 			discard_response(st);
@@ -1504,7 +1502,7 @@ top:
 
 			++st->cnt;
 			if ((st->cnt >= nxacts && duration <= 0) || timer_exceeded)
-				return clientDone(st, true);	/* exit success */
+				return clientDone(st);	/* exit success */
 		}
 
 		/* increment state counter */
@@ -1541,7 +1539,7 @@ top:
 		{
 			fprintf(stderr, "client %d aborted while establishing connection\n",
 					st->id);
-			return clientDone(st, false);
+			return clientDone(st);
 		}
 		INSTR_TIME_SET_CURRENT(end);
 		INSTR_TIME_ACCUM_DIFF(thread->conn_time, end, start);
@@ -1873,7 +1871,7 @@ top:
 			bool		ret = runShellCommand(st, argv[1], argv + 2, argc - 2);
 
 			if (timer_exceeded) /* timeout */
-				return clientDone(st, true);
+				return clientDone(st);
 			else if (!ret)		/* on error */
 			{
 				st->ecnt++;
@@ -1887,7 +1885,7 @@ top:
 			bool		ret = runShellCommand(st, NULL, argv + 1, argc - 1);
 
 			if (timer_exceeded) /* timeout */
-				return clientDone(st, true);
+				return clientDone(st);
 			else if (!ret)		/* on error */
 			{
 				st->ecnt++;
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to