summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
authorXavier Chantry <chantry.xavier@gmail.com>2010-10-31 21:39:31 +0100
committerDan McGee <dan@archlinux.org>2010-12-13 03:07:15 +0100
commitc2cce1f46a754c04c3623088a9e43922a6c10e2d (patch)
tree615ee055aa3f4c8ada883d800aeb7ddea036daf6 /lib/libalpm/be_package.c
parent0e39cf9275c6a6f965e364792527c2704327bd02 (diff)
downloadpacman-c2cce1f46a754c04c3623088a9e43922a6c10e2d.tar.gz
pacman-c2cce1f46a754c04c3623088a9e43922a6c10e2d.tar.xz
Fix a few problems reported by clang-analyzer
One missing NULL-check and 3 dead assignments. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index 254f830b..a0a657db 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -54,7 +54,6 @@ void *_package_changelog_open(pmpkg_t *pkg)
struct archive *archive = NULL;
struct archive_entry *entry;
const char *pkgfile = pkg->origin_data.file;
- int ret = ARCHIVE_OK;
if((archive = archive_read_new()) == NULL) {
RET_ERR(PM_ERR_LIBARCHIVE, NULL);
@@ -68,7 +67,7 @@ void *_package_changelog_open(pmpkg_t *pkg)
RET_ERR(PM_ERR_PKG_OPEN, NULL);
}
- while((ret = archive_read_next_header(archive, &entry)) == ARCHIVE_OK) {
+ while(archive_read_next_header(archive, &entry) == ARCHIVE_OK) {
const char *entry_name = archive_entry_pathname(entry);
if(strcmp(entry_name, ".CHANGELOG") == 0) {