Code cleanup

This commit is contained in:
Aurelien Foret 2005-03-16 22:06:31 +00:00
parent 2b63d0103d
commit 04e195284e
3 changed files with 8 additions and 5 deletions

View File

@ -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 {

View File

@ -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 */

View File

@ -28,7 +28,6 @@
#include "log.h"
/* Internal library log mechanism */
alpm_cb_log pm_logcb = NULL;
unsigned char pm_logmask = 0;