# HG changeset patch # User Matti Hamalainen # Date 1578249912 -7200 # Node ID cc6d8d47dbc2aa7fe8fe16d2895a484a2c3f0b82 # Parent c98be346c706e89a2e6519e0ecb4dbd1fc942c2c More sidlib_stildb_free() to more logical position in the source. diff -r c98be346c706 -r cc6d8d47dbc2 sidlib.c --- a/sidlib.c Sun Jan 05 20:43:41 2020 +0200 +++ b/sidlib.c Sun Jan 05 20:45:12 2020 +0200 @@ -683,6 +683,24 @@ } +/* Free a given STIL database + */ +void sidlib_stildb_free(SIDLibSTILDB *dbh) +{ + if (dbh != NULL) + { + th_llist_free_func((th_llist_t *) dbh->nodes, + (void (*)(void *)) sidlib_stildb_node_free); + + dbh->nodes = NULL; + dbh->nnodes = 0; + + th_free_r(&dbh->pindex); + th_free(dbh); + } +} + + /* Read database (additively) to given db-structure */ enum @@ -1109,24 +1127,6 @@ } -/* Free a given STIL database - */ -void sidlib_stildb_free(SIDLibSTILDB *dbh) -{ - if (dbh != NULL) - { - th_llist_free_func((th_llist_t *) dbh->nodes, - (void (*)(void *)) sidlib_stildb_node_free); - - dbh->nodes = NULL; - dbh->nnodes = 0; - - th_free_r(&dbh->pindex); - th_free(dbh); - } -} - - /* Get STIL information node from database */ SIDLibSTILNode *sidlib_stildb_get_node(SIDLibSTILDB *dbh, const char *filename)