@@ -1582,10 +1582,8 @@ preparedStatementName(char *buffer, int file, int state)
15821582}
15831583
15841584static bool
1585- clientDone (CState * st , bool ok )
1585+ clientDone (CState * st )
15861586{
1587- (void ) ok ; /* unused */
1588-
15891587 if (st -> con != NULL )
15901588 {
15911589 PQfinish (st -> con );
@@ -1656,7 +1654,7 @@ doCustom(TState *thread, CState *st, StatsData *agg)
16561654
16571655 /* stop client if next transaction is beyond pgbench end of execution */
16581656 if (duration > 0 && st -> txn_scheduled > end_time )
1659- return clientDone (st , true );
1657+ return clientDone (st );
16601658
16611659 /*
16621660 * If this --latency-limit is used, and this slot is already late so
@@ -1709,7 +1707,7 @@ doCustom(TState *thread, CState *st, StatsData *agg)
17091707 if (!PQconsumeInput (st -> con ))
17101708 { /* there's something wrong */
17111709 fprintf (stderr , "client %d aborted in state %d; perhaps the backend died while processing\n" , st -> id , st -> state );
1712- return clientDone (st , false );
1710+ return clientDone (st );
17131711 }
17141712 if (PQisBusy (st -> con ))
17151713 return true; /* don't have the whole result yet */
@@ -1756,7 +1754,7 @@ doCustom(TState *thread, CState *st, StatsData *agg)
17561754 fprintf (stderr , "client %d aborted in state %d: %s" ,
17571755 st -> id , st -> state , PQerrorMessage (st -> con ));
17581756 PQclear (res );
1759- return clientDone (st , false );
1757+ return clientDone (st );
17601758 }
17611759 PQclear (res );
17621760 discard_response (st );
@@ -1772,7 +1770,7 @@ doCustom(TState *thread, CState *st, StatsData *agg)
17721770
17731771 ++ st -> cnt ;
17741772 if ((st -> cnt >= nxacts && duration <= 0 ) || timer_exceeded )
1775- return clientDone (st , true ); /* exit success */
1773+ return clientDone (st ); /* exit success */
17761774 }
17771775
17781776 /* increment state counter */
@@ -1809,7 +1807,7 @@ doCustom(TState *thread, CState *st, StatsData *agg)
18091807 {
18101808 fprintf (stderr , "client %d aborted while establishing connection\n" ,
18111809 st -> id );
1812- return clientDone (st , false );
1810+ return clientDone (st );
18131811 }
18141812 INSTR_TIME_SET_CURRENT (end );
18151813 INSTR_TIME_ACCUM_DIFF (thread -> conn_time , end , start );
@@ -2010,7 +2008,7 @@ doCustom(TState *thread, CState *st, StatsData *agg)
20102008 bool ret = runShellCommand (st , argv [1 ], argv + 2 , argc - 2 );
20112009
20122010 if (timer_exceeded ) /* timeout */
2013- return clientDone (st , true );
2011+ return clientDone (st );
20142012 else if (!ret ) /* on error */
20152013 {
20162014 st -> ecnt ++ ;
@@ -2024,7 +2022,7 @@ doCustom(TState *thread, CState *st, StatsData *agg)
20242022 bool ret = runShellCommand (st , NULL , argv + 1 , argc - 1 );
20252023
20262024 if (timer_exceeded ) /* timeout */
2027- return clientDone (st , true );
2025+ return clientDone (st );
20282026 else if (!ret ) /* on error */
20292027 {
20302028 st -> ecnt ++ ;
0 commit comments