diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-15 18:06:43 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-15 18:12:16 (EDT) |
commit | 97acd4ee3c87c58876acf274839172566621cb66 (patch) | |
tree | 74fbb0534dfd544b41bdc329955121174b136bce | |
parent | e707a8fa42f8b9a2d75fd22678f7431ef1323589 (diff) |
main: Cast function type
-rw-r--r-- | src/gzip.c | 2 | ||||
-rw-r--r-- | src/gzip.h | 4 | ||||
-rw-r--r-- | src/main.c | 4 |
3 files changed, 7 insertions, 3 deletions
@@ -32,7 +32,7 @@ struct opkg_opk_gzip { }; struct opkg_opk_gzip * -opkg_opk_gzip_init(int (*read)(void *, char **, size_t *), void *user_data) +opkg_opk_gzip_init(opkg_opk_gzip_read_func *read, void *user_data) { struct opkg_opk_gzip *gzip; @@ -22,8 +22,10 @@ struct opkg_opk_gzip; +typedef int (opkg_opk_gzip_read_func)(void *, char **, size_t *); + struct opkg_opk_gzip * -opkg_opk_gzip_init(int (*read)(void *, char **, size_t *), void *user_data); +opkg_opk_gzip_init(opkg_opk_gzip_read_func *read, void *user_data); int opkg_opk_gzip_read(struct opkg_opk_gzip *gzip, void *record); @@ -76,7 +76,9 @@ _opkg_opk_main_extract(const char *file_name, const char *outer_member, goto error3; } - inner_gzip = opkg_opk_gzip_init(&opkg_opk_ustar_read, outer_ustar); + inner_gzip = opkg_opk_gzip_init( + (opkg_opk_gzip_read_func *) &opkg_opk_ustar_read, + outer_ustar); if (inner_gzip == NULL) { goto error3; } |