Skip to content

Commit 012db18

Browse files
ask valgrind explicitly
1 parent 8518fcd commit 012db18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/silentpayments.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <stdio.h>
1010
#include <assert.h>
1111
#include <string.h>
12+
#include <valgrind/memcheck.h>
1213

1314
#include <secp256k1_extrakeys.h>
1415
#include <secp256k1_silentpayments.h>
@@ -100,7 +101,7 @@ const unsigned char* label_lookup(
100101
) {
101102
const struct labels_cache* cache = (const struct labels_cache*)cache_ptr;
102103
size_t i;
103-
for (i = 0; i < cache->entries_used; i++) {
104+
for (i = 0; i < cache->entries_used; i++) {printf("lhs: %lu\n", VALGRIND_CHECK_MEM_IS_DEFINED(&cache->entries[i], sizeof(struct label_cache_entry))); printf("rhs: %lu\n", VALGRIND_CHECK_MEM_IS_DEFINED(label33, 33));
104105
if (memcmp(cache->entries[i].label, label33, 33) == 0) {
105106
return cache->entries[i].label_tweak;
106107
}

0 commit comments

Comments
 (0)