EON Steel: mark tank cache initialized when filling it in
The previous commit fixed the cache initialization testing, and uncovered the fact that the tank size cache initialization didn't set the initialized bit correctly. That oversight had been hidden by the fact that we then tested the bit wrongly, so not setting it right didn't use to matter as long as there were other higher cache bits that were set. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
42601825aa
commit
8ade60304d
@ -1085,6 +1085,7 @@ static int add_gas_type(suunto_eonsteel_parser_t *eon, const struct type_desc *d
|
||||
eon->cache.tankinfo[idx] = tankinfo;
|
||||
|
||||
eon->cache.initialized |= 1 << DC_FIELD_GASMIX_COUNT;
|
||||
eon->cache.initialized |= 1 << DC_FIELD_TANK_COUNT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1115,6 +1116,7 @@ static int add_gas_size(suunto_eonsteel_parser_t *eon, float l)
|
||||
int idx = eon->cache.ngases-1;
|
||||
if (idx >= 0)
|
||||
eon->cache.tanksize[idx] = l;
|
||||
eon->cache.initialized |= 1 << DC_FIELD_TANK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user