diff options
author | Felix Fietkau <nbd@nbd.name> | 2023-01-15 11:22:14 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2023-05-27 08:00:26 +0200 |
commit | 15f1a669e8e22be119e5e0f93a0665ccbaecb5e6 (patch) | |
tree | c85a99bf73cb4d486e9b155a2ed043543081ecb9 | |
parent | 740e2501fdcaf72b540166ff3bac1dd42efb8cf1 (diff) |
struct: remove state->len
It is unused and I couldn't find any purpose for it
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | lib/struct.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/struct.c b/lib/struct.c index 751127c..cf4499a 100644 --- a/lib/struct.c +++ b/lib/struct.c @@ -2012,7 +2012,7 @@ optimize_functions(void) static formatstate_t * parse_format(uc_vm_t *vm, uc_value_t *fmtval) { - ssize_t size, len, num, itemsize; + ssize_t size, num, itemsize; const formatdef_t *e, *f; const char *fmt, *s; formatstate_t *state; @@ -2040,7 +2040,6 @@ parse_format(uc_vm_t *vm, uc_value_t *fmtval) s = fmt; size = 0; - len = 0; ncodes = 0; while ((c = *s++) != '\0') { @@ -2080,7 +2079,6 @@ parse_format(uc_vm_t *vm, uc_value_t *fmtval) case '*': /* fall through */ case 's': case 'p': - len++; ncodes++; break; @@ -2088,8 +2086,6 @@ parse_format(uc_vm_t *vm, uc_value_t *fmtval) break; default: - len += num; - if (num) ncodes++; @@ -2117,7 +2113,6 @@ parse_format(uc_vm_t *vm, uc_value_t *fmtval) } state = xalloc(sizeof(*state) + ncodes * sizeof(formatcode_t)); - state->len = len; state->size = size; state->ncodes = ncodes; |