Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.c
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 /lib/libalpm/alpm.c
parent2b63d0103db404dd03def3b263c635b23eda065d (diff)
Code cleanup
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c7
1 files changed, 5 insertions, 2 deletions
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 */