diff options
author | Vitaly Buka <vitalybuka@google.com> | 2021-05-06 23:32:36 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-06 23:32:36 +0000 |
commit | f9473bd1e13e40e1fbb6521552cfec05cada0429 (patch) | |
tree | 3c8af79e710d2e58afdbfaac35f214f5405c9c83 | |
parent | 963344c9bc5af709e7358556c5a511427d4227fb (diff) | |
parent | 7ed85d43653b8414643ae1c27ba8af91b550c916 (diff) | |
download | scudo-f9473bd1e13e40e1fbb6521552cfec05cada0429.tar.gz |
[NFC][scudo] Suppress "division by zero" warning am: 709ed1284c am: 7ed85d4365
Original change: https://android-review.googlesource.com/c/platform/external/scudo/+/1698908
Change-Id: Iffbd4941f07e14971a76e237b3a0b5b0cfad2ef3
-rw-r--r-- | standalone/secondary.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/standalone/secondary.h b/standalone/secondary.h index ce3d7b48cc6..03ac68cc02d 100644 --- a/standalone/secondary.h +++ b/standalone/secondary.h @@ -170,7 +170,7 @@ public: if (Config::SecondaryCacheQuarantineSize && useMemoryTagging<Config>(Options)) { QuarantinePos = - (QuarantinePos + 1) % Config::SecondaryCacheQuarantineSize; + (QuarantinePos + 1) % Max(Config::SecondaryCacheQuarantineSize, 1u); if (!Quarantine[QuarantinePos].CommitBase) { Quarantine[QuarantinePos] = Entry; return; |