From e4a4cf7ce544707faa691c8ab1bf298549979b12 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 6 Apr 2008 20:09:27 -0500 Subject: libalpm error cleanup, step 1 Remove unused error codes, begin refactoring some of the others. Signed-off-by: Dan McGee --- lib/libalpm/package.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/libalpm/package.c') diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 587e7fc4..b072f3f3 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -509,7 +509,7 @@ void SYMEXPORT *alpm_pkg_changelog_open(pmpkg_t *pkg) int ret = ARCHIVE_OK; if((archive = archive_read_new()) == NULL) { - RET_ERR(PM_ERR_LIBARCHIVE_ERROR, NULL); + RET_ERR(PM_ERR_LIBARCHIVE, NULL); } archive_read_support_compression_all(archive); @@ -995,7 +995,7 @@ pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full) } if((archive = archive_read_new()) == NULL) { - RET_ERR(PM_ERR_LIBARCHIVE_ERROR, NULL); + RET_ERR(PM_ERR_LIBARCHIVE, NULL); } archive_read_support_compression_all(archive); @@ -1052,7 +1052,7 @@ pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full) if(archive_read_data_skip(archive)) { _alpm_log(PM_LOG_ERROR, _("error while reading package %s: %s\n"), pkgfile, archive_error_string(archive)); - pm_errno = PM_ERR_LIBARCHIVE_ERROR; + pm_errno = PM_ERR_LIBARCHIVE; goto error; } @@ -1065,7 +1065,7 @@ pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full) if(ret != ARCHIVE_EOF && ret != ARCHIVE_OK) { /* An error occured */ _alpm_log(PM_LOG_ERROR, _("error while reading package %s: %s\n"), pkgfile, archive_error_string(archive)); - pm_errno = PM_ERR_LIBARCHIVE_ERROR; + pm_errno = PM_ERR_LIBARCHIVE; goto error; } -- cgit v1.2.3-24-g4f1b