diff options
author | Yi-Yo Chiang <yochiang@google.com> | 2021-02-17 09:42:56 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-02-17 09:42:56 +0000 |
commit | 99e0277ae43d66c8c755acc2c0ccd63b8a899af8 (patch) | |
tree | 6c4b0a188949657ddaed694ea4262d72deaeec63 | |
parent | 305b00dfe06ac2f56cc4b3e75508ea71c9d4c905 (diff) | |
parent | 23a996fde114247e6f2f67df37d955a640e9775b (diff) | |
download | gsid-99e0277ae43d66c8c755acc2c0ccd63b8a899af8.tar.gz |
Explicitly cast to 64bit integer when calculating filesystem size am: 23a996fde1
Original change: https://android-review.googlesource.com/c/platform/system/gsid/+/1585024
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ide0224ef438c86bec40518ef355d9cfc6623527c
-rw-r--r-- | partition_installer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/partition_installer.cpp b/partition_installer.cpp index fea1483..79af71a 100644 --- a/partition_installer.cpp +++ b/partition_installer.cpp @@ -126,8 +126,8 @@ int PartitionInstaller::PerformSanityChecks() { // This is the same as android::vold::GetFreebytes() but we also // need the total file system size so we open code it here. - uint64_t free_space = 1ULL * sb.f_bavail * sb.f_frsize; - uint64_t fs_size = sb.f_blocks * sb.f_frsize; + uint64_t free_space = static_cast<uint64_t>(sb.f_bavail) * sb.f_frsize; + uint64_t fs_size = static_cast<uint64_t>(sb.f_blocks) * sb.f_frsize; if (free_space <= (size_)) { LOG(ERROR) << "not enough free space (only " << free_space << " bytes available)"; return IGsiService::INSTALL_ERROR_NO_SPACE; |