Re: [PATCH v2] promisor-remote: fix xcalloc() argument order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 23, 2022 at 11:57:33AM +0200, SZEDER Gábor wrote:

> Pass the number of elements first and their size second, as expected
> by xcalloc().
> 
> Patch generated with:
> 
>   make SPATCH_FLAGS=--recursive-includes contrib/coccinelle/xcalloc.cocci.patch

Thanks for digging here. I think it probably explains a lot of "wait,
why did this result change" head-scratching I did back when we started
batching a few years ago.

Is there any reason we wouldn't want --recursive-includes to be added to
the default SPATCH_FLAGS?

I suspect we'd still want to leave --all-includes there to get as much
type information as possible. If I understand correctly, the two are
orthogonal (one is "follow includes of includes" and the other is
"follow system includes in angle brackets").

Doing so doesn't seem to find any other missed entries in the current
codebase, but I'm pretty sure there are some it would have caught in a
less mysterious fashion over the years.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux