mirror of
https://github.com/postgres/postgres.git
synced 2026-06-08 16:26:30 -04:00
Move variable increment to the end of the loop
This is less error prone and matches the placement of other code in the file. Justin Pryzby Reviewed by Tom Lane Discussion: https://www.postgresql.org/message-id/20221123172436.GJ11463@telsasoft.com
This commit is contained in:
parent
cca1863489
commit
995a9fb14f
1 changed files with 2 additions and 1 deletions
|
|
@ -842,7 +842,6 @@ pgstat_read_current_status(void)
|
|||
CHECK_FOR_INTERRUPTS();
|
||||
}
|
||||
|
||||
beentry++;
|
||||
/* Only valid entries get included into the local array */
|
||||
if (localentry->backendStatus.st_procpid > 0)
|
||||
{
|
||||
|
|
@ -871,6 +870,8 @@ pgstat_read_current_status(void)
|
|||
#endif
|
||||
localNumBackends++;
|
||||
}
|
||||
|
||||
beentry++;
|
||||
}
|
||||
|
||||
/* Set the pointer only after completion of a valid table */
|
||||
|
|
|
|||
Loading…
Reference in a new issue