diff options
author | Anatol Pomozov <anatol.pomozov@gmail.com> | 2020-05-18 23:13:11 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-07-07 13:35:39 +0200 |
commit | 34ba8d984d89393ab85ca67724b87af67ff004c3 (patch) | |
tree | 940fc5e13f63aad4af1aa14aefe859b25e08d98e /lib/libalpm/log.h | |
parent | f078c2d3bcb72bafda0dce5fe2c9418ca462bb1a (diff) | |
download | pacman-34ba8d984d89393ab85ca67724b87af67ff004c3.tar.gz pacman-34ba8d984d89393ab85ca67724b87af67ff004c3.tar.xz |
Do not use counter for error tracking
Current code uses an incrementing counter to check whether a function
returned error:
errors += some_function();
if(errors) { goto finish }
Replace with a more standard variable
errors = some_function();
if(errors) { goto finish }
Rename 'errors' variable to a more typical 'ret'.
Avoid reporting both ALPM_EVENT_PKG_RETRIEVE_FAILED and
ALPM_EVENT_PKG_RETRIEVE_DONE in the error path.
Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/log.h')
0 files changed, 0 insertions, 0 deletions