diff options
Diffstat (limited to 'third_party/nix/src/libstore/gc.cc')
-rw-r--r-- | third_party/nix/src/libstore/gc.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/third_party/nix/src/libstore/gc.cc b/third_party/nix/src/libstore/gc.cc index a491d7e32c48..596046e4f324 100644 --- a/third_party/nix/src/libstore/gc.cc +++ b/third_party/nix/src/libstore/gc.cc @@ -241,7 +241,8 @@ void LocalStore::findTempRoots(FDs& fds, Roots& tempRoots, bool censor) { std::string::size_type pos = 0; std::string::size_type end; - while ((end = contents.find((char)0, pos)) != std::string::npos) { + while ((end = contents.find(static_cast<char>(0), pos)) != + std::string::npos) { Path root(contents, pos, end - pos); DLOG(INFO) << "got temporary root " << root; assertStorePath(root); @@ -916,7 +917,7 @@ void LocalStore::autoGC(bool sync) { throw SysError("getting filesystem info about '%s'", realStoreDir); } - return (uint64_t)st.f_bavail * st.f_bsize; + return static_cast<uint64_t>(st.f_bavail) * st.f_bsize; }; std::shared_future<void> future; |