Define ARCHIVE_READ_BLOCKSIZE and use it rather than using magic numbers.

--HG--
extra : convert_revision : b8e6755400eb6f2bef0ea1eb25a258f9ed1714c2
This commit is contained in:
Juan RP 2009-04-09 18:38:05 +02:00
parent 053abca5ef
commit 58c6a31297
3 changed files with 6 additions and 2 deletions

View file

@ -92,7 +92,8 @@ unpack_archive_init(prop_dictionary_t pkg, const char *binfile)
archive_read_support_format_all(ar);
/* 2048 is arbitrary... dunno what value is better. */
if ((rv = archive_read_open_fd(ar, pkg_fd, 2048)) != 0) {
if ((rv = archive_read_open_fd(ar, pkg_fd,
ARCHIVE_READ_BLOCKSIZE)) != 0) {
archive_read_finish(ar);
(void)close(pkg_fd);
return rv;