diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-19 11:04:30 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-02-19 11:24:04 -0800 |
commit | a00bfc918a0813c6bbc6bb44a577aa3ee929da5c (patch) | |
tree | 0a2ec126c343fcd817b2827a43232d0ed193ee9d /divelist.c | |
parent | bcf1f8c4feb97655681eb0b146fc9808fe996ff6 (diff) | |
download | subsurface-a00bfc918a0813c6bbc6bb44a577aa3ee929da5c.tar.gz |
Fix find_trip_by_idx() over-zealous cleanup
Commit bcf1f8c4feb9 ("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>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/divelist.c b/divelist.c index 8dac63f34..08f47121c 100644 --- a/divelist.c +++ b/divelist.c @@ -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; |