Cleanup: More Fixes for Problems Reported by Coverity.
Fix the problem another way as Coverity was still not happy with it. Signed-off-by: Michael Keller <mikeller@042.ch>
This commit is contained in:
parent
a2cd621819
commit
bb00a9728f
@ -762,7 +762,8 @@ static void setup_gas_sensor_pressure(const struct dive *dive, const struct dive
|
|||||||
std::vector<int> last(num_cyl, INT_MAX);
|
std::vector<int> last(num_cyl, INT_MAX);
|
||||||
const struct divecomputer *secondary;
|
const struct divecomputer *secondary;
|
||||||
|
|
||||||
unsigned prev = (unsigned)explicit_first_cylinder(dive, dc);
|
int prev = explicit_first_cylinder(dive, dc);
|
||||||
|
prev = prev >= 0 ? prev : 0;
|
||||||
seen[prev] = 1;
|
seen[prev] = 1;
|
||||||
|
|
||||||
for (ev = get_next_event(dc->events, "gaschange"); ev != NULL; ev = get_next_event(ev->next, "gaschange")) {
|
for (ev = get_next_event(dc->events, "gaschange"); ev != NULL; ev = get_next_event(ev->next, "gaschange")) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user