mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix find_trip_by_idx() over-zealous cleanup
Commit bcf1f8c4fe
("Don't do "remove_from_trip" by walking the gtk
data structures") made find_trip_by_idx() only work for negative indexes
(positive indexes are dives), but when it removed the unnecessary test
for negativity, the statement inside it should have been kept as
unconditional, rather than removed with the test.
Oops.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bcf1f8c4fe
commit
a00bfc918a
1 changed files with 1 additions and 1 deletions
|
@ -1035,7 +1035,7 @@ static dive_trip_t *find_trip_by_idx(int idx)
|
|||
|
||||
if (idx >= 0)
|
||||
return NULL;
|
||||
|
||||
idx = -idx;
|
||||
while (trip) {
|
||||
if (trip->index == idx)
|
||||
return trip;
|
||||
|
|
Loading…
Add table
Reference in a new issue