summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-04-29 23:40:06 -0500
committerDan McGee <dan@archlinux.org>2012-04-29 23:40:06 -0500
commit5a9f5c60dae8d173e9e2f6da78499c046600e6ca (patch)
tree03026ea9b58078964d6b7c6be67378adf17d0610 /lib/libalpm/be_package.c
parent4d3170978711a91f1afe8ffef9dad9c2bc60585d (diff)
downloadpacman-5a9f5c60dae8d173e9e2f6da78499c046600e6ca.tar.xz
Convert ALLOC_FAIL macro into a function
This path is rarely (read: never) taken in any normal run of the code, so injecting the fprintf() call everywhere with the macro is a bit overkill. Instead, add a lightweight _alpm_alloc_fail() function that gets called instead. This does have a reasonable effect on the size of the generated code; most places using the macros provided by util.c have their code size reduced. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_package.c')
-rw-r--r--lib/libalpm/be_package.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c
index bcb884f4..0d296a81 100644
--- a/lib/libalpm/be_package.c
+++ b/lib/libalpm/be_package.c
@@ -476,7 +476,7 @@ alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle,
newfiles = realloc(newpkg->files.files,
sizeof(alpm_file_t) * files_size);
if(!newfiles) {
- ALLOC_FAIL(sizeof(alpm_file_t) * files_size);
+ _alpm_alloc_fail(sizeof(alpm_file_t) * files_size);
goto error;
}
/* ensure all new memory is zeroed out, in both the initial