Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/delta.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/delta.c')
-rw-r--r--lib/libalpm/delta.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c
index c88955f7..1dd2bf44 100644
--- a/lib/libalpm/delta.c
+++ b/lib/libalpm/delta.c
@@ -249,12 +249,11 @@ static alpm_list_t *find_unused(alpm_list_t *deltas, const char *to, off_t quota
alpm_list_t SYMEXPORT *alpm_pkg_unused_deltas(alpm_pkg_t *pkg)
{
- off_t pkgsize = alpm_pkg_get_size(pkg);
- alpm_list_t *unused = find_unused(
+ ASSERT(pkg != NULL, return NULL);
+ return find_unused(
alpm_pkg_get_deltas(pkg),
alpm_pkg_get_filename(pkg),
- pkgsize * MAX_DELTA_RATIO);
- return unused;
+ pkg->size * MAX_DELTA_RATIO);
}
/** @} */