git-commit-vandalism/xdiff
Phillip Wood 4a37b80e88 xdiff: refactor a function
Use the standard "goto out" pattern rather than repeating very similar
code after checking for each error. This will simplify the next commit
that starts handling allocation failures that are currently ignored.
On error xdl_do_diff() frees the environment so we need to take care
to avoid a double free in that case. xdl_build_script() does not
assign a result unless it is successful so there is no possibility of
a double free if it fails.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-02-16 10:58:15 -08:00
..
xdiff.h xdiff: implement a zealous diff3, or "zdiff3" 2021-12-01 14:45:58 -08:00
xdiffi.c xdiff: fix a memory leak 2022-02-16 10:58:05 -08:00
xdiffi.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xemit.c xdiff-interface: replace discard_hunk_line() with a flag 2021-05-11 12:47:31 +09:00
xemit.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xhistogram.c xdiff: fix a memory leak 2022-02-16 10:58:05 -08:00
xinclude.h xdiff: use git-compat-util 2019-04-12 13:34:17 +09:00
xmacros.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xmerge.c xdiff: refactor a function 2022-02-16 10:58:15 -08:00
xpatience.c xdiff: handle allocation failure in patience diff 2022-02-16 10:58:13 -08:00
xprepare.c xdiff: avoid unnecessary memory allocations 2021-11-18 22:23:45 -08:00
xprepare.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xtypes.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00
xutils.c xdiff: drop system includes in xutils.c 2019-07-28 21:51:19 -07:00
xutils.h Replace Free Software Foundation address in license notices 2017-11-09 13:21:21 +09:00