MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / is_all_zeros

Function is_all_zeros

libcppcryptfs/util/util.cpp:600–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

598 }
599
600bool is_all_zeros(const BYTE *buf, size_t len)
601{
602
603 if (len <= sizeof(uint64_t)) {
604 const BYTE zeros[sizeof(uint64_t)] = { 0 };
605 return !memcmp(buf, zeros, len);
606 }
607
608 TESTZERO(uint64_t);
609
610 TESTZERO(uint32_t);
611
612 TESTZERO(uint16_t);
613
614 return test_zero_bytes<uint8_t>(buf, len);
615}
616
617
618

Callers 1

read_blockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected