MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / util_OffsetToAddr

Function util_OffsetToAddr

src/db/blockrecordarray.cpp:55–58  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// util_OffsetToAddr -- given an offset from the end of a block (such as is stored in tRecordIndex) return a pointer to memory inside the block that corresponds to the given offset //////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

53// that corresponds to the given offset
54///////////////////////////////////////////////////////////////////////////////
55inline int8* util_OffsetToAddr(cBlockFile::Block* pBlock, int offset)
56{
57 return (pBlock->GetData() + (cBlockFile::BLOCK_SIZE - offset));
58}
59
60
61///////////////////////////////////////////////////////////////////////////////

Callers 5

AddItemMethod · 0.85
DeleteItemMethod · 0.85
GetDataForReadingMethod · 0.85
GetDataForWritingMethod · 0.85
IsClassValidMethod · 0.85

Calls 1

GetDataMethod · 0.45

Tested by

no test coverage detected