summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-05-14 00:32:45 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-20 11:51:40 +0900
commit05d9cc409c7ddffcd981c0dafaf67ba6935cc0ba (patch)
tree99fd8e916a1aedcee8bcfa224cc51597515f3837 /dive.c
parent91c20357f510fe7ea1c5740eb476fd718e41259c (diff)
downloadsubsurface-05d9cc409c7ddffcd981c0dafaf67ba6935cc0ba.tar.gz
Migrate code to for_each_dive and for_each_dc
[Dirk Hohndel: this overlapped with my commit 09e7c61feeea ("Consistently use for_each_dive (and use it correctly)") so I took the pieces that I had missed] Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/dive.c b/dive.c
index 82d44b41b..cc673f122 100644
--- a/dive.c
+++ b/dive.c
@@ -1320,11 +1320,8 @@ static void dc_cylinder_renumber(struct dive *dive, struct divecomputer *dc, int
static void cylinder_renumber(struct dive *dive, int mapping[])
{
struct divecomputer *dc;
-
- dc = &dive->dc;
- do {
+ for_each_dc(dive, dc)
dc_cylinder_renumber(dive, dc, mapping);
- } while ((dc = dc->next) != NULL);
}
/*