mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Add IsNull() to class CAutoFile and remove operator !
This commit is contained in:
committed by
Wladimir J. van der Laan
parent
64ffc995d6
commit
fef24cab1a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user