summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-03-01 03:08:41 +0000
committerDan McGee <dan@archlinux.org>2007-03-01 03:08:41 +0000
commit4a45a273ead089ffa280ce5c160039ec392fa6f3 (patch)
tree62299628f5243459bf3324c9bc01be9e89fa6d70 /lib/libalpm
parent13e21110459aaf99dd739802c2b07b3d5b9e2a68 (diff)
downloadpacman-4a45a273ead089ffa280ce5c160039ec392fa6f3.tar.xz
* Fix up _alpm_db_free, remove use of void*.
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/db.c6
-rw-r--r--lib/libalpm/db.h2
-rw-r--r--lib/libalpm/server.h1
3 files changed, 3 insertions, 6 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 62255a3f..a44e079d 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -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);
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index 008ff669..4f3c1bf0 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -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);
diff --git a/lib/libalpm/server.h b/lib/libalpm/server.h
index 60c9163c..8c357ab2 100644
--- a/lib/libalpm/server.h
+++ b/lib/libalpm/server.h
@@ -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 {