summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-18 13:31:32 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-18 13:31:32 (EDT)
commit60f11fdb2ba2df49ed2fca1511828f96d3bbd9ce (patch)
tree4d2f9204e2aeba202a718e54566a1e792100e235 /src/main.c
parent507c5f7001a1da8a22ade991c885b89cafd76696 (diff)
main: Drop a macro
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 3b80e8e..8b80a1f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -26,11 +26,9 @@
#include "gzip.h"
#include "ustar.h"
-#define OPKG_OPK_MAIN_FILE_BUFFER_SIZE_ 8192
-
struct _opkg_opk_main_opk {
FILE *file;
- char file_buffer[OPKG_OPK_MAIN_FILE_BUFFER_SIZE_];
+ char file_buffer[8192];
struct opkg_opk_gzip *outer_gzip;
struct opkg_opk_ustar *outer_ustar;
char *version_buffer;
@@ -45,7 +43,7 @@ _opkg_opk_main_file_read(void *user_data, char **buffer, size_t *size)
struct _opkg_opk_main_opk *opk = user_data;
*buffer = opk->file_buffer;
- *size = fread(opk->file_buffer, 1, OPKG_OPK_MAIN_FILE_BUFFER_SIZE_,
+ *size = fread(opk->file_buffer, 1, sizeof(opk->file_buffer),
opk->file);
if (feof(opk->file)) {
return OPKG_OPK_END;