1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Change ASSERT() to CHECK() in infoLoad().

Coverity complains that "Argument loaded of ASSERT() has a side effect because the variable is volatile. The containing function might work differently in a non-debug build."

It does not look like this is a real issue, but a CHECK() here is not too expensive for production so change it to silence Coverity.

Also fix a typo in the comment.
This commit is contained in:
David Steele 2021-08-18 13:32:16 -04:00
parent 9ddfcd6a6d
commit bb1ca1d309

View File

@ -498,8 +498,8 @@ infoLoad(const String *error, InfoLoadCallback *callbackFunction, void *callback
loaded = callbackFunction(callbackData, try);
done = true;
// There must be at least one attempt to the load file
ASSERT(loaded || try > 0);
// There must be at least one attempt to load the file
CHECK(loaded || try > 0);
}
CATCH_ANY()
{