diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2014-09-26 20:30:57 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2014-09-26 20:31:18 +0200 |
commit | 64cfaf891fe539b36f6be37dac6c28a712d70b96 (patch) | |
tree | 520c1e99eb70e7fd0ea85305b357d107f021a2a8 /src/net.cpp | |
parent | 610a3d3a1bd171b963600c55fab715ca2aa30da3 (diff) | |
parent | 6eb67b0ed2b350b772f7edb67aee1bcf09c91b0b (diff) | |
download | bitcoin-64cfaf891fe539b36f6be37dac6c28a712d70b96.tar.xz |
Merge pull request #4986
6eb67b0 autofile: Disallow by-value copies of CAutoFile (Cory Fields)
eee030f autofile: don't copy CAutoFile by value (Cory Fields)
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index ab547e2fd7..866bac2c0e 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1957,7 +1957,7 @@ bool CAddrDB::Write(const CAddrMan& addr) // open temp output file, and associate with CAutoFile boost::filesystem::path pathTmp = GetDataDir() / tmpfn; FILE *file = fopen(pathTmp.string().c_str(), "wb"); - CAutoFile fileout = CAutoFile(file, SER_DISK, CLIENT_VERSION); + CAutoFile fileout(file, SER_DISK, CLIENT_VERSION); if (!fileout) return error("%s : Failed to open file %s", __func__, pathTmp.string()); @@ -1982,7 +1982,7 @@ bool CAddrDB::Read(CAddrMan& addr) { // open input file, and associate with CAutoFile FILE *file = fopen(pathAddr.string().c_str(), "rb"); - CAutoFile filein = CAutoFile(file, SER_DISK, CLIENT_VERSION); + CAutoFile filein(file, SER_DISK, CLIENT_VERSION); if (!filein) return error("%s : Failed to open file %s", __func__, pathAddr.string()); |