diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-30 04:17:11 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-30 04:17:11 (EDT) |
commit | 3f29b6d136d87ae5ca15c9f839b0e406e8aa1b71 (patch) | |
tree | d26657c26fab7d235aca523a3659f9423d6d5327 /src/opk | |
parent | 5e7ab29517bd7d599ef687353ca2422d0061a517 (diff) |
opk/write: Fix fwrite()
Diffstat (limited to 'src/opk')
-rw-r--r-- | src/opk/write.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/opk/write.c b/src/opk/write.c index 12a36c6..1b490ee 100644 --- a/src/opk/write.c +++ b/src/opk/write.c @@ -34,8 +34,7 @@ _opkg_opk_opk_write_file(void *user_data, size_t size) { struct opkg_opk_opk *opk = user_data; - if (fwrite(opk->file_buffer, 1, sizeof(opk->file_buffer), opk->file) == - size) { + if (fwrite(opk->file_buffer, 1, size, opk->file) == size) { return OPKG_OPK_OK; } else { return OPKG_OPK_ERROR; |