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:
authorDan McGee <dan@archlinux.org>2011-06-07 16:06:16 -0500
committerDan McGee <dan@archlinux.org>2011-06-13 19:38:38 -0500
commite2aa952689da8763d534d1c19310eb97009f4f76 (patch)
tree7d022d67801bc01c24fef985feb9a617c48d316a /lib/libalpm/alpm.c
parent8b62d9bc0ade64897990b8fc6a1b6a54b629cb5b (diff)
Move pm_errno onto the handle
This involves some serious changes and a very messy diff, unfortunately. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r--lib/libalpm/alpm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index d5168709..86b1619a 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -35,7 +35,6 @@
#include "util.h"
/* Globals */
-enum _pmerrno_t pm_errno SYMEXPORT;
extern pmhandle_t *handle;
/** \addtogroup alpm_interface Interface Functions
@@ -107,6 +106,7 @@ cleanup:
*/
int SYMEXPORT alpm_release(pmhandle_t *myhandle)
{
+ int ret = 0;
pmdb_t *db;
ASSERT(myhandle != NULL, return -1);
@@ -119,7 +119,7 @@ int SYMEXPORT alpm_release(pmhandle_t *myhandle)
}
if(alpm_db_unregister_all(myhandle) == -1) {
- return -1;
+ ret = -1;
}
_alpm_handle_free(myhandle);
@@ -131,7 +131,7 @@ int SYMEXPORT alpm_release(pmhandle_t *myhandle)
curl_global_cleanup();
#endif
- return 0;
+ return ret;
}
/** @} */