diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-23 19:23:28 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-06-14 17:28:36 +0300 |
commit | f77d9c79aa41dab4285e95c9432cc6d853be67a3 (patch) | |
tree | 1ddaa6df9b643fbd2d4a092891957af02f860a42 /src/addrman.h | |
parent | 06703973c758c2c5d0ff916993aa7055f609d2d7 (diff) |
refactor: Fix CAddrMan::Check style
This change improves readability, and follows Developer Notes.
Diffstat (limited to 'src/addrman.h')
-rw-r--r-- | src/addrman.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/addrman.h b/src/addrman.h index a11dffd048..600c524bce 100644 --- a/src/addrman.h +++ b/src/addrman.h @@ -716,11 +716,10 @@ private: void Check() { #ifdef DEBUG_ADDRMAN - { - LOCK(cs); - int err; - if ((err=Check_())) - LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err); + LOCK(cs); + const int err = Check_(); + if (err) { + LogPrintf("ADDRMAN CONSISTENCY CHECK FAILED!!! err=%i\n", err); } #endif } |