MCPcopy Create free account
hub / github.com/ElementsProject/lightning / memeqzero

Function memeqzero

ccan/ccan/mem/mem.c:92–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92bool memeqzero(const void *data, size_t length)
93{
94 const unsigned char *p = data;
95 size_t len;
96
97 /* Check first 16 bytes manually */
98 for (len = 0; len < 16; len++) {
99 if (!length)
100 return true;
101 if (*p)
102 return false;
103 p++;
104 length--;
105 }
106
107 /* Now we know that's zero, memcmp with self. */
108 return memcmp(data, p, length) == 0;
109}
110
111void memtaint(void *data, size_t len)
112{

Callers 11

wallet_stmt2htlc_inFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
handle_validate_rbfFunction · 0.85
process_onionpacketFunction · 0.85
channel_id_is_allFunction · 0.85
wireaddr_is_wildcardFunction · 0.85
extract_channel_idFunction · 0.85
printwire_utf8_arrayFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68