MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / adfNormalSum

Function adfNormalSum

dep/adflib/src/adf_raw.c:260–273  ·  view source on GitHub ↗

* NormalSum * * buf = where the block is stored * offset = checksum place (in bytes) * bufLen = buffer length (in bytes) */

Source from the content-addressed store, hash-verified

258 * bufLen = buffer length (in bytes)
259 */
260 uint32_t
261adfNormalSum( UCHAR* buf, int offset, int bufLen )
262{
263 int32_t newsum;
264 int i;
265
266 newsum=0L;
267 for(i=0; i < (bufLen/4); i++)
268 if ( i != (offset/4) ) /* old chksum */
269 newsum+=Long(buf+i*4);
270 newsum=(-newsum); /* WARNING */
271
272 return(newsum);
273}
274
275/*
276 * adfBitmapSum

Callers 15

adfWriteFileHdrBlockFunction · 0.85
adfReadDataBlockFunction · 0.85
adfWriteDataBlockFunction · 0.85
adfReadFileExtBlockFunction · 0.85
adfWriteFileExtBlockFunction · 0.85
adfReadRDSKblockFunction · 0.85
adfWriteRDSKblockFunction · 0.85
adfReadPARTblockFunction · 0.85
adfWritePARTblockFunction · 0.85
adfReadFSHDblockFunction · 0.85
adfWriteFSHDblockFunction · 0.85
adfReadLSEGblockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected