* Fix up _alpm_db_free, remove use of void*.

This commit is contained in:
Dan McGee 2007-03-01 03:08:41 +00:00
parent 13e2111045
commit 4a45a273ea
3 changed files with 3 additions and 6 deletions

View File

@ -78,13 +78,11 @@ pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename)
return(db);
}
void _alpm_db_free(void *data)
void _alpm_db_free(pmdb_t *db)
{
pmdb_t *db = data;
ALPM_LOG_FUNC;
FREELISTSERVERS(db->servers);
_FREELIST(db->servers, _alpm_server_free);
FREE(db->path);
FREE(db);

View File

@ -48,7 +48,7 @@ struct __pmdb_t {
/* db.c, database general calls */
pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename);
void _alpm_db_free(void *data);
void _alpm_db_free(pmdb_t *db);
int _alpm_db_cmp(const void *db1, const void *db2);
alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles);
pmdb_t *_alpm_db_register(const char *treename, alpm_cb_db_register callback);

View File

@ -28,7 +28,6 @@
#include <download.h>
#define FREESERVER(p) do { if(p){_alpm_server_free(p); p = NULL;}} while(0)
#define FREELISTSERVERS(p) _FREELIST(p, _alpm_server_free)
/* Servers */
struct __pmserver_t {