]> git.tdb.fi Git - ext/subsurface.git/blobdiff - info.c
Might as well free current_file
[ext/subsurface.git] / info.c
diff --git a/info.c b/info.c
index 242e4b24d5823bfb580c23e86af974316fabbaeb..cccc6497b9515ea71d4087dfbb905bf74d2391f9 100644 (file)
--- a/info.c
+++ b/info.c
@@ -1,7 +1,7 @@
 /* info.c */
-/* creates the UI for the info frame - 
+/* creates the UI for the info frame -
  * controlled through the following interfaces:
- * 
+ *
  * void show_dive_info(struct dive *dive)
  *
  * called from gtk-ui:
@@ -482,7 +482,7 @@ void update_equipment_data(struct dive *dive, struct dive *master)
        if ( ! cylinders_equal(remember_cyl, master->cylinder) &&
                (no_cylinders(dive->cylinder) ||
                        cylinders_equal(dive->cylinder, remember_cyl)))
-               memcpy(dive->cylinder, master->cylinder, CYL_BYTES);
+               copy_cylinders(master->cylinder, dive->cylinder);
        if (! weightsystems_equal(remember_ws, master->weightsystem) &&
                (no_weightsystems(dive->weightsystem) ||
                        weightsystems_equal(dive->weightsystem, remember_ws)))
@@ -519,7 +519,7 @@ int edit_multi_dive_info(struct dive *single_dive)
                        int i;
                        struct dive *dive;
 
-                       for (i = 0; (dive = get_dive(i)) != NULL; i++) {
+                       for_each_dive(i, dive) {
                                if (dive == master || !dive->selected)
                                        continue;
                                /* copy all "info" fields */