index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aurelien Foret <aurelien@archlinux.org> | 2005-03-16 22:06:31 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-03-16 22:06:31 +0000 |
commit | 04e195284e0439436143a297a561aef1a6c35b17 (patch) | |
tree | 9e52e8b8039246975bcdc13a6293d2a28886da0c /lib/libalpm/alpm.c | |
parent | 2b63d0103db404dd03def3b263c635b23eda065d (diff) |
-rw-r--r-- | lib/libalpm/alpm.c | 7 |
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 */ |