aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/.clang-format2
-rw-r--r--src/torcontrol.cpp4
-rw-r--r--src/wallet/wallet.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/.clang-format b/src/.clang-format
index fc53509138..5918819d13 100644
--- a/src/.clang-format
+++ b/src/.clang-format
@@ -47,6 +47,6 @@ SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
-Standard: Cpp03
+Standard: Cpp11
TabWidth: 8
UseTab: Never
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp
index 1883005163..eb0722cd81 100644
--- a/src/torcontrol.cpp
+++ b/src/torcontrol.cpp
@@ -376,8 +376,10 @@ static std::pair<bool,std::string> ReadBinaryFile(const fs::path &filename, size
while ((n=fread(buffer, 1, sizeof(buffer), f)) > 0) {
// Check for reading errors so we don't return any data if we couldn't
// read the entire file (or up to maxsize)
- if (ferror(f))
+ if (ferror(f)) {
+ fclose(f);
return std::make_pair(false,"");
+ }
retval.append(buffer, buffer+n);
if (retval.size() > maxsize)
break;
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 45937ee21f..ad606b8535 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -77,7 +77,7 @@ class CScheduler;
class CTxMemPool;
class CBlockPolicyEstimator;
class CWalletTx;
-class FeeCalculation;
+struct FeeCalculation;
/** (client) version numbers for particular wallet features */
enum WalletFeature