I'm porting a GPL tool written in C to Rust. The Rust compiler I'm using is 1.80.1
The problem is that in the attached Rust code, total will always be 0 which is unexpected.
A deeplink to the original code: https://github.com/coreboot/bios_extract/blob/master/src/lh5_extract.c#L281