On 04/04/19 at 12:21am, Leonardo Bras wrote:
> Signed-off-by: Leonardo Bras <[email protected]>
> ---
>  src/pacman/sync.c | 84 ++++++++++++++++++++++++-----------------------
>  1 file changed, 43 insertions(+), 41 deletions(-)

I appreciate the reduction of indentation, but I think this does more harm than
good.  It breaks our official style rules because err is no longer declared at
the top of its block; it makes sync_prepare_execute inconsistent because the
trans_prepare error is still handled in an if block; finally, it makes the
error branch look like the primary execution branch instead of an exception.
I would move the error printing out of sync_prepare_execute altogether into
print_{prepare,commit}_error functions.  That will also have the benefit of
shortening sync_prepare_execute, which is a bit long.

Reply via email to