mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Clean up confusing code in setup_gas_sensor_pressure()
The "prev" cylinder can never be negative since commit 56c206d19f
("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
1 changed files with 2 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue