On Thu, Feb 27, 2020 at 02:35:38PM +0000, Carl Henrik Holth Lunde wrote:
> > Well, after having looked at it more closely, I'd still rather keep
> > the hole-filling algorithm, so if you have a v3 between the two
> > versions it would be great :-)
> 
> Do you mean just with an exit code?

I suppose you mean the check on pattern_finalize_config() ? I guess we
can't do much more in this case, unless you find where the conflicting
ones were declared but I'm not sure we keep that info in the patterns.

> And maybe change
> sizeof(struct pat_ref *) to sizeof(arr[0]) - if this is safe event when
> arr is of length 0?

I think you're speaking of the calloc call, right ? It's indeed cleaner,
and the recommended way of doing it (or just sizeof(*arr)). I don't see
the relation with arr being of length zero. I mean you're dereferencing
its *type* to get another type then its size, you're not dereferencing
the pointer's value, if that's your concern.

So I think I'm not seeing anything wrong here. If you're OK with that
as well, I'll just change the sizeof in the calloc to make things more
future-proof.

Thanks!
Willy

Reply via email to