summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-03-07 20:52:45 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-03-07 20:52:45 +0000
commitf0151aa587a074a51cb8a7b01b393ac0b61002d9 (patch)
treecaa4695c88101acf513856dee02f3c7fe5a57528 /lib/libalpm/package.c
parentfa5e6cef759ad9e0f6c669c2b891d687599cac14 (diff)
downloadpacman-f0151aa587a074a51cb8a7b01b393ac0b61002d9.tar.xz
code cleanup
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index b7d2cb5b..8150dd7c 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -89,7 +89,8 @@ pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg)
newpkg = (pmpkg_t *)malloc(sizeof(pmpkg_t));
if(newpkg == NULL) {
- return(NULL);
+ _alpm_log(PM_LOG_ERROR, "malloc failure: could not allocate %d bytes", sizeof(pmpkg_t));
+ RET_ERR(PM_ERR_MEMORY, NULL);
}
STRNCPY(newpkg->name, pkg->name, PKG_NAME_LEN);
@@ -258,7 +259,7 @@ pmpkg_t *_alpm_pkg_load(char *pkgfile)
info = _alpm_pkg_new(NULL, NULL);
if(info == NULL) {
tar_close(tar);
- RET_ERR(PM_ERR_MEMORY, NULL);
+ return(NULL);
}
/* ORE