From cbe0122bf18d702e1fb7c383ff3681544bb74005 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 8 Oct 2018 13:09:18 +0000 Subject: [PATCH] wallet2: initialize amount to 0 in tx_scan_info_t ctor It seems the more prudent thing to do here. It will not catch attempts to use that value before it is initialized when using ASAN or valgrind, but in a case where it does, it will have smaller repercussions. So it seems appropriate in this particular case. Coverity 182498 --- src/wallet/wallet2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index 680196f01..caf77c60f 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -229,7 +229,7 @@ namespace tools bool error; boost::optional received; - tx_scan_info_t(): money_transfered(0), error(true) {} + tx_scan_info_t(): amount(0), money_transfered(0), error(true) {} }; struct transfer_details