mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Remove extra argument and add a test
The compiler complained about this and it seems the function does not need it. Additional-test-suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
b50d5b63ad
commit
9feda56006
1 changed files with 3 additions and 1 deletions
|
@ -1287,7 +1287,9 @@ static struct dive *get_last_valid_dive()
|
||||||
*/
|
*/
|
||||||
int get_dive_nr_at_idx(int idx)
|
int get_dive_nr_at_idx(int idx)
|
||||||
{
|
{
|
||||||
struct dive *last_dive = get_last_valid_dive(dive_table.nr - 1);
|
if (idx < dive_table.nr)
|
||||||
|
return 0;
|
||||||
|
struct dive *last_dive = get_last_valid_dive();
|
||||||
if (!last_dive)
|
if (!last_dive)
|
||||||
return 1;
|
return 1;
|
||||||
return last_dive->number ? last_dive->number + 1 : 0;
|
return last_dive->number ? last_dive->number + 1 : 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue