summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/divelist.c b/divelist.c
index f34c91e7b..223205e27 100644
--- a/divelist.c
+++ b/divelist.c
@@ -371,9 +371,10 @@ int get_divenr(struct dive *dive)
{
int i;
struct dive *d;
- for_each_dive(i, d)
- if (d == dive)
- return i;
+ for_each_dive(i, d) {
+ if (d == dive)
+ return i;
+ }
return -1;
}