aboutsummaryrefslogtreecommitdiff
path: root/src/util/system.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-01 08:28:29 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-01 08:28:34 +0100
commitffd5e7a8567d666a2e9233a6a52b0fc8dfe6a035 (patch)
tree3b91b847d570a12164c2cbde1c6c4923125ebabe /src/util/system.h
parent81d5af42f4dba5b68a597536cad7f61894dc22a3 (diff)
parentce9dd45422e1f4ecce6df68da086b8bfc2100756 (diff)
downloadbitcoin-ffd5e7a8567d666a2e9233a6a52b0fc8dfe6a035.tar.xz
Merge #20519: Handle rename failure in DumpMempool(...) by using the RenameOver(...) return value. Add [[nodiscard]] to RenameOver(...).
ce9dd45422e1f4ecce6df68da086b8bfc2100756 Add [[nodiscard]] to RenameOver(...) (practicalswift) 9429a398e291a1b5edcfc657b94fcaf52cd1d8f9 Handle rename failure in DumpMempool(...) by using RenameOver(...) return value (practicalswift) Pull request description: Handle rename failure in `DumpMempool(...)` by using the `RenameOver(...)` return value. Add `[[nodiscard]]` to `RenameOver(...)` to reduce the risk of similar rename issues in the future. ACKs for top commit: vasild: ACK ce9dd454 theStack: ACK ce9dd45422e1f4ecce6df68da086b8bfc2100756 🏷️ Tree-SHA512: 1e63d7f3061e1f6ea2df5750dbc1547a39bd50b6c529812a0c8a0c11d3100c241afdf14094e69b69a38bade7e54a12b2a42888545874398eaf5d02421b57e874
Diffstat (limited to 'src/util/system.h')
-rw-r--r--src/util/system.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/system.h b/src/util/system.h
index 78ebf751bf..2be8bb754b 100644
--- a/src/util/system.h
+++ b/src/util/system.h
@@ -60,7 +60,7 @@ bool FileCommit(FILE *file);
bool TruncateFile(FILE *file, unsigned int length);
int RaiseFileDescriptorLimit(int nMinFD);
void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length);
-bool RenameOver(fs::path src, fs::path dest);
+[[nodiscard]] bool RenameOver(fs::path src, fs::path dest);
bool LockDirectory(const fs::path& directory, const std::string lockfile_name, bool probe_only=false);
void UnlockDirectory(const fs::path& directory, const std::string& lockfile_name);
bool DirIsWritable(const fs::path& directory);