diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-06-04 21:25:42 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-06-19 13:11:10 -0700 |
commit | d129085b59df6e84f0415c347e8425c13b5ca868 (patch) | |
tree | 6b802faca507b1c600b7156af135cfaa49dc1efd /core/parse.c | |
parent | 3df32044ee46caf518b23cc6359f98501f7ca961 (diff) | |
download | subsurface-d129085b59df6e84f0415c347e8425c13b5ca868.tar.gz |
Cleanup: use add_to_dive_table() in record_dive_to_table()
This was reimplementing functionality that was already there.
Simply call the already existing function.
Thus, we don't have to export the grow_dive_table function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/parse.c')
-rw-r--r-- | core/parse.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/core/parse.c b/core/parse.c index 8bd960179..0581ace00 100644 --- a/core/parse.c +++ b/core/parse.c @@ -78,12 +78,7 @@ int trimspace(char *buffer) */ void record_dive_to_table(struct dive *dive, struct dive_table *table) { - assert(table != NULL); - struct dive **dives = grow_dive_table(table); - int nr = table->nr; - - dives[nr] = fixup_dive(dive); - table->nr = nr + 1; + add_to_dive_table(table, table->nr, fixup_dive(dive)); } void record_dive(struct dive *dive) |