mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: Fix Problems Raised by Coverity Scan.
Opportunistically fix some problems newly raised by a recent Coverity scan. Not touching any of the string memory allocation issues as this is being handled by the move towards C++ strings. Signed-off-by: Michael Keller <mikeller@042.ch>
This commit is contained in:
parent
3229d1e3a1
commit
e6ff3f7537
3 changed files with 11 additions and 10 deletions
|
@ -470,7 +470,7 @@ static bool has_unknown_used_cylinders(const struct dive *dive, const struct div
|
|||
|
||||
/* We know about the explicit first cylinder (or first) */
|
||||
idx = explicit_first_cylinder(dive, dc);
|
||||
if (used_and_unknown[idx]) {
|
||||
if (idx >= 0 && used_and_unknown[idx]) {
|
||||
used_and_unknown[idx] = false;
|
||||
num--;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue