1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-10-30 23:37:45 +02:00

Fix incorrect not-equal comparison in TEST_RESULT_Z_NE().

This comparison was not being used for strings in the tests but best to fix it so it does not cause confusion in the future.
This commit is contained in:
Yegor
2025-04-21 20:02:56 +07:00
committed by GitHub
parent 9386920b79
commit 4bb7cb1ac6
2 changed files with 5 additions and 2 deletions

View File

@@ -408,13 +408,16 @@
<commit subject="Fix test logging in storageHelperDryRunInit().">
<github-pull-request id="2597"/>
</commit>
<commit subject="Fix incorrect not-equal comparison in TEST_RESULT_Z_NE().">
<github-pull-request id="2608"/>
</commit>
<release-item-contributor-list>
<release-item-contributor id="yegor.zhmak"/>
<release-item-reviewer id="david.steele"/>
</release-item-contributor-list>
<p>Fix test logging and comments in unit tests.</p>
<p>Fix tests, logging, and comments in unit tests.</p>
</release-item>
</release-development-list>
</release-test-list>

View File

@@ -686,7 +686,7 @@ hrnTestResultZ(const char *actual, const char *expected, HarnessTestResultOperat
case harnessTestResultOperationNe:
result =
(actual == NULL && expected != NULL) || (actual != NULL && expected == NULL) ||
(actual != NULL && expected != NULL && strcmp(actual, expected) == 0);
(actual != NULL && expected != NULL && strcmp(actual, expected) != 0);
break;
}