From 74e347f09bd62872de84b431dcf029090931d199 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 21 Dec 2006 01:53:40 +0000 Subject: * modeline fixes / reformatting * formatting / indentation fixes * makepkg: Dan McGee - integrity check fix Jürgen Hötzel - EUID usage and "x$foo" check revamp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/libalpm/add.c | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'lib/libalpm/add.c') diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 51029d6d..92aceff6 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -562,40 +562,40 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db) if(!file) continue; if(!strcmp(file, pathname)) { - if(info->sha1sum != NULL && info->sha1sum != '\0') { - /* 32 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */ - if((fn = (char *)malloc(strlen(file)+34)) == NULL) { - RET_ERR(PM_ERR_MEMORY, -1); - } - sprintf(fn, "%s\t%s", file, md5_pkg); - FREE(file); - lp->data = fn; - } else { - /* 41 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */ - if((fn = (char *)malloc(strlen(file)+43)) == NULL) { - RET_ERR(PM_ERR_MEMORY, -1); + if(info->sha1sum != NULL && info->sha1sum != '\0') { + /* 32 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */ + if((fn = (char *)malloc(strlen(file)+34)) == NULL) { + RET_ERR(PM_ERR_MEMORY, -1); + } + sprintf(fn, "%s\t%s", file, md5_pkg); + FREE(file); + lp->data = fn; + } else { + /* 41 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */ + if((fn = (char *)malloc(strlen(file)+43)) == NULL) { + RET_ERR(PM_ERR_MEMORY, -1); + } + sprintf(fn, "%s\t%s", file, sha1_pkg); + FREE(file); + lp->data = fn; } - sprintf(fn, "%s\t%s", file, sha1_pkg); - FREE(file); - lp->data = fn; - } } } if (info->sha1sum != NULL && info->sha1sum != '\0') { - _alpm_log(PM_LOG_DEBUG, _("checking md5 hashes for %s"), pathname); - _alpm_log(PM_LOG_DEBUG, _("current: %s"), md5_local); - _alpm_log(PM_LOG_DEBUG, _("new: %s"), md5_pkg); - if(md5_orig) { - _alpm_log(PM_LOG_DEBUG, _("original: %s"), md5_orig); - } + _alpm_log(PM_LOG_DEBUG, _("checking md5 hashes for %s"), pathname); + _alpm_log(PM_LOG_DEBUG, _("current: %s"), md5_local); + _alpm_log(PM_LOG_DEBUG, _("new: %s"), md5_pkg); + if(md5_orig) { + _alpm_log(PM_LOG_DEBUG, _("original: %s"), md5_orig); + } } else { - _alpm_log(PM_LOG_DEBUG, _("checking sha1 hashes for %s"), pathname); - _alpm_log(PM_LOG_DEBUG, _("current: %s"), sha1_local); - _alpm_log(PM_LOG_DEBUG, _("new: %s"), sha1_pkg); - if(sha1_orig) { - _alpm_log(PM_LOG_DEBUG, _("original: %s"), sha1_orig); - } + _alpm_log(PM_LOG_DEBUG, _("checking sha1 hashes for %s"), pathname); + _alpm_log(PM_LOG_DEBUG, _("current: %s"), sha1_local); + _alpm_log(PM_LOG_DEBUG, _("new: %s"), sha1_pkg); + if(sha1_orig) { + _alpm_log(PM_LOG_DEBUG, _("original: %s"), sha1_orig); + } } if(!pmo_upgrade) { -- cgit v1.2.3-54-g00ecf