summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-01-06 17:53:03 +0200
committerLasse Collin <lasse.collin@tukaani.org>2023-01-06 17:53:03 +0200
commit02608f74ea1f2d2d56585711ff241c34b4ad0937 (patch)
treecefffa85fcc8ff175cd34024dfa4f489dabeb8f9 /tests
parent056766c8601a3808bea1761f6cc833197a35a3e0 (diff)
downloadxz-02608f74ea1f2d2d56585711ff241c34b4ad0937.tar.gz
Tests: test_index_hash: Don't treat pointers as booleans.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_index_hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_index_hash.c b/tests/test_index_hash.c
index 63188dc..9b7caad 100644
--- a/tests/test_index_hash.c
+++ b/tests/test_index_hash.c
@@ -60,7 +60,7 @@ test_lzma_index_hash_append(void)
// Test with invalid Unpadded Size
lzma_index_hash *index_hash = lzma_index_hash_init(NULL, NULL);
- assert_true(index_hash);
+ assert_true(index_hash != NULL);
assert_lzma_ret(lzma_index_hash_append(index_hash,
UNPADDED_SIZE_MIN - 1, LZMA_VLI_MAX),
LZMA_PROG_ERROR);
@@ -152,7 +152,7 @@ test_lzma_index_hash_decode(void)
assert_skip("Encoder or decoder support disabled");
#else
lzma_index_hash *index_hash = lzma_index_hash_init(NULL, NULL);
- assert_true(index_hash);
+ assert_true(index_hash != NULL);
size_t in_pos = 0;
@@ -313,7 +313,7 @@ test_lzma_index_hash_size(void)
assert_skip("Decoder support disabled");
#else
lzma_index_hash *index_hash = lzma_index_hash_init(NULL, NULL);
- assert_true(index_hash);
+ assert_true(index_hash != NULL);
// First test empty index_hash
// Expected size should be: