diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-01-08 21:25:02 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-10 02:37:03 +0900 |
commit | e1cd055111cc4f7e11454b3726741f9f8a55d850 (patch) | |
tree | bb391d65743da3285367ec1f1803925978db6877 /core/divelist.c | |
parent | 70cabb968c481e566e8249465f153e05e6dc0347 (diff) | |
download | subsurface-e1cd055111cc4f7e11454b3726741f9f8a55d850.tar.gz |
code cleanup: add empty table structures
It seemed to make sense to combine all three types in one commit.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/divelist.c')
-rw-r--r-- | core/divelist.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/divelist.c b/core/divelist.c index 48f5a270c..6995c4c50 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -992,10 +992,10 @@ static bool merge_dive_tables(struct dive_table *dives_from, struct dive_table * void add_imported_dives(struct dive_table *import_table, struct trip_table *import_trip_table, struct dive_site_table *import_sites_table, int flags) { int i, idx; - struct dive_table dives_to_add = { 0 }; - struct dive_table dives_to_remove = { 0 }; - struct trip_table trips_to_add = { 0 }; - struct dive_site_table dive_sites_to_add = { 0 }; + struct dive_table dives_to_add = empty_dive_table; + struct dive_table dives_to_remove = empty_dive_table; + struct trip_table trips_to_add = empty_trip_table; + struct dive_site_table dive_sites_to_add = empty_dive_site_table; /* Process imported dives and generate lists of dives * to-be-added and to-be-removed */ @@ -1121,7 +1121,7 @@ void process_imported_dives(struct dive_table *import_table, struct trip_table * /* If the caller didn't pass an import_trip_table because all * dives are tripless, provide a local table. This may be * necessary if the trips are autogrouped */ - struct trip_table local_trip_table = { 0 }; + struct trip_table local_trip_table = empty_trip_table; if (!import_trip_table) import_trip_table = &local_trip_table; |