Clean up confusing code in setup_gas_sensor_pressure()
The "prev" cylinder can never be negative since commit 56c206d19fba
("For more manual gas pressure details"), so remove stale code that
checks for a case that cannot happen any more.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c8a7712ea5
commit
8136c2d78b
@ -835,8 +835,7 @@ static void setup_gas_sensor_pressure(struct dive *dive, struct divecomputer *dc
|
||||
if (cyl < 0)
|
||||
continue;
|
||||
|
||||
if (prev >= 0)
|
||||
last[prev] = sec;
|
||||
last[prev] = sec;
|
||||
prev = cyl;
|
||||
|
||||
last[cyl] = sec;
|
||||
@ -846,8 +845,7 @@ static void setup_gas_sensor_pressure(struct dive *dive, struct divecomputer *dc
|
||||
seen[cyl] = 1;
|
||||
}
|
||||
}
|
||||
if (prev >= 0)
|
||||
last[prev] = INT_MAX;
|
||||
last[prev] = INT_MAX;
|
||||
|
||||
for (i = 0; i < MAX_CYLINDERS; i++) {
|
||||
cylinder_t *cyl = dive->cylinder + i;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user