]> git.99rst.org Git - git.git/commit
merge-file: refactor for subsequent memory leak fix
authorÆvar Arnfjörð Bjarmason <redacted>
Fri, 1 Jul 2022 10:42:55 +0000 (12:42 +0200)
committerJunio C Hamano <redacted>
Fri, 1 Jul 2022 18:43:43 +0000 (11:43 -0700)
commit480a0e30a78a6a86e1ea97059f72e4bf4299d052
tree5efaa6159105c86be84e31b1ecbd460c09d98eea
parentd90dafbe3180aa0ad095a5f2fa9c83bfa3d3767d
merge-file: refactor for subsequent memory leak fix

Refactor the code in builtin/merge-file.c to:

 * Use the initializer to zero out "mmfs", and use modern C syntax for
   the rest.

 * Refactor the the inner loop to use a variable and "if/else if"
   pattern followed by "return". This will make a change to change it to
   a "goto cleanup" pattern smaller.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/merge-file.c
git clone https://git.99rst.org/PROJECT