Cleanup: move clear_table() to divesite.c

There were two declaration of clear_table(), one in dive.h and one
in parse.h. The definition was in parse.c. Since the parser doesn't
even use the function, move the function and its declaration to
divelist.[ch] and remove the redundant declaration in dive.h.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-10-14 15:33:46 +02:00 committed by Dirk Hohndel
parent b01cba13c5
commit 0b57b8d59f
5 changed files with 13 additions and 13 deletions

View file

@ -70,16 +70,6 @@ int trimspace(char *buffer)
return size; // return string length
}
/*
* Clear a dive_table
*/
void clear_table(struct dive_table *table)
{
for (int i = 0; i < table->nr; i++)
free(table->dives[i]);
table->nr = 0;
}
/*
* Add a dive into the dive_table array
*/