pgbackrest.git / summary / log / commit / refs
commit bb1ca1d3099db2ccb5cdd11a90a9d62ecabc009b
Author: David Steele <david@pgmasters.net>
Date: Wed Aug 18 17:32:16 2021 +0000
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.
src/info/info.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/info/info.c b/src/info/info.c
index 78f6d1da4..df64af976 100644
--- a/src/info/info.c
+++ b/src/info/info.c
@@ -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()
{
[parent: 9ddfcd6a6de5]