aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorRuben Dario Ponticeli <rdponticelli@gmail.com>2014-10-13 20:48:34 -0300
committerWladimir J. van der Laan <laanwj@gmail.com>2014-10-20 12:46:56 +0200
commitfef24cab1a4a13a864783dfcd6613ce8100f990d (patch)
treebc93a06eab6f788c167cbb0d32d3144d00325fed /src/net.cpp
parent64ffc995d685cf8a53ef868572e835ce42269ec6 (diff)
downloadbitcoin-fef24cab1a4a13a864783dfcd6613ce8100f990d.tar.xz
Add IsNull() to class CAutoFile and remove operator !
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 50b435cf14..b7c958143c 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1929,7 +1929,7 @@ bool CAddrDB::Write(const CAddrMan& addr)
boost::filesystem::path pathTmp = GetDataDir() / tmpfn;
FILE *file = fopen(pathTmp.string().c_str(), "wb");
CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
- if (!fileout)
+ if (fileout.IsNull())
return error("%s : Failed to open file %s", __func__, pathTmp.string());
// Write and commit header, data
@@ -1954,7 +1954,7 @@ bool CAddrDB::Read(CAddrMan& addr)
// open input file, and associate with CAutoFile
FILE *file = fopen(pathAddr.string().c_str(), "rb");
CAutoFile filein(file, SER_DISK, CLIENT_VERSION);
- if (!filein)
+ if (filein.IsNull())
return error("%s : Failed to open file %s", __func__, pathAddr.string());
// use file size to size memory buffer