[LTP] [PATCH v2 4/7] docparse: Implement ARRAY_SIZE()

Cyril Hrubis chrubis@suse.cz
Tue Nov 2 13:07:36 CET 2021


Hi!
> > +
> > +		if (strcmp(buf[cur_buf], "]") && strcmp(buf[cur_buf], "[")) {
> 
> So this seems to mean we would silently ignore a variants array which
> was declared with an explicit size. A quick grep doesn't turn up any
> instances of that. However this would be an unexpected result. People
> may intuitively think adding an explicity size would make parsing
> easier.

I would say that adding explicit size to arrays whose size is defined
by their initialize is a mistake, at least in our case so I'm inclined
to keep this as it is.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list