summaryrefslogtreecommitdiffstats
path: root/save-xml.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 /save-xml.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 'save-xml.c')
-rw-r--r--save-xml.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/save-xml.c b/save-xml.c
index ddaa8cd2a..e52cfdffd 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -392,12 +392,8 @@ void save_one_dive(struct membuffer *b, struct dive *dive)
save_weightsystem_info(b, dive);
save_dive_temperature(b, dive);
/* Save the dive computer data */
- dc = &dive->dc;
- do {
+ for_each_dc(dive, dc)
save_dc(b, dive, dc);
- dc = dc->next;
- } while (dc);
-
put_format(b, "</dive>\n");
}