summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2005-03-16 22:06:31 +0000
committerAurelien Foret <aurelien@archlinux.org>2005-03-16 22:06:31 +0000
commit04e195284e0439436143a297a561aef1a6c35b17 (patch)
tree9e52e8b8039246975bcdc13a6293d2a28886da0c
parent2b63d0103db404dd03def3b263c635b23eda065d (diff)
downloadpacman-04e195284e0439436143a297a561aef1a6c35b17.tar.xz
Code cleanup
-rw-r--r--lib/libalpm/add.c5
-rw-r--r--lib/libalpm/alpm.c7
-rw-r--r--lib/libalpm/log.c1
3 files changed, 8 insertions, 5 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 4d1bdd1f..c5745c30 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -311,8 +311,9 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
/* Figure out whether this package was installed explicitly by the user
* or installed as a dependency for another package
*/
- /* ORE
info->reason = PM_PKG_REASON_EXPLICIT;
+ /* ORE
+ only relevant for sync operations?
if(pm_list_is_strin(dependonly, info->data)) {
info->reason = PM_PKG_REASON_DEPEND;
}*/
@@ -343,7 +344,7 @@ int add_commit(pmdb_t *db, pmtrans_t *trans)
for(lp = provides; lp; lp = lp->next) {
lp->data = NULL;
}
- pm_list_free(provides);
+ FREELIST(provides);
continue;
}
} else {
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 9dc6556b..a6e2c2dd 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -50,8 +50,8 @@
#include "handle.h"
#include "alpm.h"
+/* Globals */
pmhandle_t *handle = NULL;
-
enum __pmerrno_t pm_errno;
/*
@@ -132,6 +132,7 @@ int alpm_get_option(unsigned char parm, long *data)
{
/* Sanity checks */
ASSERT(handle != NULL, PM_RET_ERR(PM_ERR_HANDLE_NULL, -1));
+ ASSERT(data != NULL, PM_RET_ERR(PM_ERR_WRONG_ARGS, -1));
return(handle_get_option(handle, parm, data));
}
@@ -147,7 +148,9 @@ int alpm_db_register(char *treename, PM_DB **db)
ASSERT(treename != NULL && strlen(treename) != 0, PM_RET_ERR(PM_ERR_WRONG_ARGS, -1));
ASSERT(db != NULL, PM_RET_ERR(PM_ERR_WRONG_ARGS, -1));
- /* check if the db if already registered */
+ /* ORE
+ check if the db if already registered */
+
*db = db_open(handle->root, handle->dbpath, treename);
if(*db == NULL) {
/* couldn't open the db directory - try creating it */
diff --git a/lib/libalpm/log.c b/lib/libalpm/log.c
index 2eff80e4..b970b8f5 100644
--- a/lib/libalpm/log.c
+++ b/lib/libalpm/log.c
@@ -28,7 +28,6 @@
#include "log.h"
/* Internal library log mechanism */
-
alpm_cb_log pm_logcb = NULL;
unsigned char pm_logmask = 0;