shared/install: avoid overwriting 'r' counter with a partial result
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Oct 2018 10:31:13 +0000 (12:31 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Oct 2018 13:36:24 +0000 (15:36 +0200)
commit459500a32cf74edca93ec79ee4cdd9dfcd20eee0
tree77d65ea468c749ba7c171184c01e870788eaf322
parent0a587335d2a16a48479b10969491a7353d78c25b
shared/install: avoid overwriting 'r' counter with a partial result

We want to store either the first error or the total number of changes in 'r'.
Instead, we were overwriting this with the return value from
install_info_traverse().

LGTM complained later in the loop that:
> Comparison is always true because r >= 0.
src/shared/install.c
src/test/test-install-root.c