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

Function adfBootSum

dep/adflib/src/adf_raw.c:296–314  ·  view source on GitHub ↗

* adfBootSum * */

Source from the content-addressed store, hash-verified

294 *
295 */
296 uint32_t
297adfBootSum(uint8_t *buf)
298{
299 uint32_t d, newSum;
300 int i;
301
302 newSum=0L;
303 for(i=0; i<256; i++) {
304 if (i!=1) {
305 d = Long(buf+i*4);
306 if ( (0xffffffffU-newSum)<d )
307 newSum++;
308 newSum+=d;
309 }
310 }
311 newSum = ~newSum; /* not */
312
313 return(newSum);
314}
315
316 uint32_t
317adfBootSum2(uint8_t *buf)

Callers 2

adfReadBootBlockFunction · 0.85
adfWriteBootBlockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected