summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-12-05 01:50:09 +0100
committerDan McGee <dan@archlinux.org>2010-03-14 19:25:48 -0500
commit1aa1d00248ac89fb02e762b96c58559a04679b2e (patch)
tree0326bf37268fa6167f4b17e38b58bda598a82da4 /lib/libalpm/add.c
parentbe2f43191d0d0cdf02d72ac72a013697b0f7e879 (diff)
downloadpacman-1aa1d00248ac89fb02e762b96c58559a04679b2e.tar.xz
fix a few warnings reported by clang
- remove unused variables - some more sanity checks - safer printf Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index ebcd6a55..dc565ac6 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -483,6 +483,8 @@ static int commit_single_pkg(pmpkg_t *newpkg, int pkg_current, int pkg_count,
ALPM_LOG_FUNC;
+ ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
+
snprintf(scriptlet, PATH_MAX, "%s%s-%s/install",
_alpm_db_path(db), alpm_pkg_get_name(newpkg),
alpm_pkg_get_version(newpkg));