1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-13 01:00:23 +02:00

Add MAX_ASSIGN() macro.

This improves coverage in cases where the compared values may be always ascending or descending.
This commit is contained in:
David Steele
2019-05-13 18:05:54 -04:00
parent 15a33bf74b
commit 57281d4792
2 changed files with 16 additions and 4 deletions

View File

@ -147,9 +147,8 @@ protocolParallelProcess(ProtocolParallel *this)
int handle = ioReadHandle(protocolClientIoRead(*(ProtocolClient **)lstGet(this->clientList, clientIdx)));
FD_SET((unsigned int)handle, &selectSet);
// Set the max handle
if (handle > handleMax) // {+uncovered_branch - often in ascending order}
handleMax = handle;
// Find the max file handle needed for select()
MAX_ASSIGN(handleMax, handle);
clientRunningTotal++;
}