@@ -1082,7 +1082,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
10821082bool WriteBlockToDisk (CBlock& block, CDiskBlockPos& pos)
10831083{
10841084 // Open history file to append
1085- CAutoFile fileout = CAutoFile (OpenBlockFile (pos), SER_DISK, CLIENT_VERSION);
1085+ CAutoFile fileout (OpenBlockFile (pos), SER_DISK, CLIENT_VERSION);
10861086 if (!fileout)
10871087 return error (" WriteBlockToDisk : OpenBlockFile failed" );
10881088
@@ -1110,7 +1110,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
11101110 block.SetNull ();
11111111
11121112 // Open history file to read
1113- CAutoFile filein = CAutoFile (OpenBlockFile (pos, true ), SER_DISK, CLIENT_VERSION);
1113+ CAutoFile filein (OpenBlockFile (pos, true ), SER_DISK, CLIENT_VERSION);
11141114 if (!filein)
11151115 return error (" ReadBlockFromDisk : OpenBlockFile failed" );
11161116
@@ -4503,7 +4503,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
45034503bool CBlockUndo::WriteToDisk (CDiskBlockPos &pos, const uint256 &hashBlock)
45044504{
45054505 // Open history file to append
4506- CAutoFile fileout = CAutoFile (OpenUndoFile (pos), SER_DISK, CLIENT_VERSION);
4506+ CAutoFile fileout (OpenUndoFile (pos), SER_DISK, CLIENT_VERSION);
45074507 if (!fileout)
45084508 return error (" CBlockUndo::WriteToDisk : OpenUndoFile failed" );
45094509
@@ -4535,7 +4535,7 @@ bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
45354535bool CBlockUndo::ReadFromDisk (const CDiskBlockPos &pos, const uint256 &hashBlock)
45364536{
45374537 // Open history file to read
4538- CAutoFile filein = CAutoFile (OpenUndoFile (pos, true ), SER_DISK, CLIENT_VERSION);
4538+ CAutoFile filein (OpenUndoFile (pos, true ), SER_DISK, CLIENT_VERSION);
45394539 if (!filein)
45404540 return error (" CBlockUndo::ReadFromDisk : OpenBlockFile failed" );
45414541
0 commit comments