summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-28 19:06:26 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-28 20:52:19 (EDT)
commitc5b142576ba0b81c43bfc338eaa02e954623c59a (patch)
tree2fce34ba6a2dc0b9d5171e867590932b8e0bab52
parenteffcd79eb38e3ab125a0eaf64850f52df914e965 (diff)
opk: Make version variables local
-rw-r--r--src/opk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opk.c b/src/opk.c
index 7bf5870..1df8832 100644
--- a/src/opk.c
+++ b/src/opk.c
@@ -41,8 +41,6 @@ struct opkg_opk_opk {
char file_buffer[8192];
struct opkg_opk_gzip *outer_gzip;
struct opkg_opk_ustar *outer_ustar;
- char *version_buffer;
- size_t version_size;
struct opkg_opk_gzip *inner_gzip;
struct opkg_opk_ustar *inner_ustar;
int previously_printed;
@@ -375,6 +373,8 @@ opkg_opk_opk_read(struct opkg_opk_opk *opk, const char *file_name)
{
int ret;
struct opkg_opk_ustar_member *member;
+ char *version_buffer;
+ size_t version_size;
ret = OPKG_OPK_OK;
@@ -415,14 +415,14 @@ opkg_opk_opk_read(struct opkg_opk_opk *opk, const char *file_name)
}
free(member);
if (opkg_opk_ustar_read(opk->outer_ustar,
- &opk->version_buffer, &opk->version_size) !=
+ &version_buffer, &version_size) !=
OPKG_OPK_OK) {
fputs(_("Error: Failed to read \"debian-binary\" in archive\n"),
stderr);
ret = OPKG_OPK_ERROR;
goto out3;
}
- if (opk->version_size < 4 || strncmp(opk->version_buffer, "2.", 2) != 0)
+ if (version_size < 4 || strncmp(version_buffer, "2.", 2) != 0)
{
fputs(_("Error: Unsupported package version\n"), stderr);
ret = OPKG_OPK_ERROR;