summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 79ed68c..25659b6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,9 +23,11 @@
#include "gzip.h"
#include "ustar.h"
+#define OPKG_OPK_MAIN_FILE_BUFFER_SIZE_ 8192
+
struct _opkg_opk_main_file {
FILE *file;
- char buffer[8192];
+ char buffer[OPKG_OPK_MAIN_FILE_BUFFER_SIZE_];
};
static int
@@ -34,7 +36,8 @@ _opkg_opk_main_file_read(void *user_data, char **buffer, size_t *size)
struct _opkg_opk_main_file *file = user_data;
*buffer = file->buffer;
- *size = fread(file->buffer, 1, 8192, file->file);
+ *size = fread(file->buffer, 1, OPKG_OPK_MAIN_FILE_BUFFER_SIZE_,
+ file->file);
if (feof(file->file)) {
return OPKG_OPK_END;
} else if (ferror(file->file) || *size == 0) {