[LTP] [PATCH v3 4/7] docparse: Implement ARRAY_SIZE()
Petr Vorel
pvorel@suse.cz
Thu Nov 4 21:23:50 CET 2021
Hi Cyril,
> Adds a special handlingn for ARRAY_SIZE() macro.
typo: s/handlingn/handling/
While code LGTM
Not related to this change (it's also in code in current master): return value
of parse_test_struct() is not used.
...
> +static void look_for_array_size(FILE *f, const char *arr_id, struct data_node **res)
> +{
> + const char *token;
> + char buf[2][2048] = {};
> + int cur_buf = 0;
> + int prev_buf = 1;
> +
> + for (;;) {
> + if (!(token = next_token2(f, buf[cur_buf], 2048, NULL)))
nit: there could be sizeof(buf[cur_buf]) instead of hardwiring 2048.
LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
More information about the ltp
mailing list