On Sat, Sep 12, 2020 at 08:26:41PM +0200, Tim Duesterhus wrote:
> Willy,
> 
> Am 12.09.20 um 18:52 schrieb Willy Tarreau:
> > Thanks for doing this, I really appreciate it as I too hate having
> > a named type in calloc, as it doesn't survive code changes over time.
> > 
> > I'd rather have one patch to fix the known bug and the rest as a
> > cleanup patch however, so that we can backport the fix wherever
> > needed without risking to break something subtle by accident. Just
> > let me know if that's OK for you, otherwise I'll take care of slicing
> > your patch next week.
> > 
> 
> Okay. I've split it into 2 patches.

Great, now applied, thank you!

> Checking out the blame for the BUG was fun. Apparently it's the
> second time I fixed this exact issue.

I'm not surprised. This type of practice is common and sometimes even
needed (e.g. when you put the output into a void*), so some people tend
to be more used to it than to the other.

> I'm already seeing Ilya suggesting that we add Coccinelle to the CI pipeline
> in response to this :-)

That could be an idea, indeed. I seldom run coccinelle on the code when
I spot an ugly bug that's easy to search at other places, but I don't
think about doing it often. We need to be reasonable so that we don't
have yet-another series of low importance reports to deal with that
require code changes just to silence a low-threshold detector. That's
always the difficult part.

Cheers,
Willy

Reply via email to