summaryrefslogtreecommitdiffstats
path: root/rpminfo.c
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-12 17:11:40 +0100
committerRemi Collet <remi@remirepo.net>2020-03-12 17:11:40 +0100
commitcee0fea5482e1bb2fee69bbd3ab681bfbc8e5dc7 (patch)
tree07ba7f4817efe22406eb6d06c1afba8dec8cca55 /rpminfo.c
parent6869bee2ad2aa27aa31be800b5117d76b97163b0 (diff)
micro optimization
Diffstat (limited to 'rpminfo.c')
-rw-r--r--rpminfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpminfo.c b/rpminfo.c
index 3cc5f54..2631a3f 100644
--- a/rpminfo.c
+++ b/rpminfo.c
@@ -410,7 +410,7 @@ PHP_FUNCTION(rpmdbsearch)
RETURN_FALSE;
}
- array_init(return_value);
+ array_init_size(return_value, rpmdbGetIteratorCount(di));
while ((h = rpmdbNextIterator(di)) != NULL) {
zval tmp;
rpm_header_to_zval(&tmp, h, 0);