This was missed in 5982da9d2ce (replace-object: allow
prepare_replace_object to handle arbitrary repositories, 2018-04-11)
Technically the code works correctly as the replace_map is the same
size in different repositories, however it is hard to read. So convert
the code to the familiar pattern of
> Using `git grep` I see 230 instances of 'xmalloc' and 261 instances of
> 'xcalloc'. After the Coccinelle transformation, these are down to 194 and
> 190, respectively, because the rest allocate in the same line as the
> definition. It's worth thinking about the macro pattern for those cases.
On 5/10/2018 7:56 AM, Jeff King wrote:
On Thu, May 10, 2018 at 07:23:13PM +0900, Junio C Hamano wrote:
This one was doing
ptr = xmalloc(sizeof(*another_ptr))
and it was OK because ptr and another_ptr happened to be of the same
type. I wonder if we are making it safer, or making it
On Thu, May 10, 2018 at 07:23:13PM +0900, Junio C Hamano wrote:
> This one was doing
>
> ptr = xmalloc(sizeof(*another_ptr))
>
> and it was OK because ptr and another_ptr happened to be of the same
> type. I wonder if we are making it safer, or making it more obscure
> to seasoned C
Stefan Beller writes:
> This was missed in 5982da9d2ce (replace-object: allow
> prepare_replace_object to handle arbitrary repositories, 2018-04-11)
>
> Technically the code works correctly as the replace_map is the same
> size in different repositories, however it is hard to
This was missed in 5982da9d2ce (replace-object: allow
prepare_replace_object to handle arbitrary repositories, 2018-04-11)
Technically the code works correctly as the replace_map is the same
size in different repositories, however it is hard to read. So convert
the code to the familiar pattern of
6 matches
Mail list logo