apply: introduce macro and function to init images
commit7db28d0133a8b828c8d7a829b587711acf81cddc
authorPatrick Steinhardt <ps@pks.im>
Tue, 17 Sep 2024 10:08:01 +0000 (17 12:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 17 Sep 2024 20:53:29 +0000 (17 13:53 -0700)
tree2f91c6249caa9beda24b8e26fc2e887ad191a660
parent223190377803939ab4255a72482437c178f8fcff
apply: introduce macro and function to init images

We're about to convert the `struct image` to gain a `struct strbuf`
member, which requires more careful initialization than just memsetting
it to zeros. Introduce the `IMAGE_INIT` macro and `image_init()`
function to prepare for this change.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
apply.c