Shore up dividing by zero protections.

We're already trying to protect against zero elsewhere in this file,
but we've seen evidence of it still happening, so add last-ditch
protections.

Test: builds, boots
Bug: 73060623
Change-Id: I0549ed08f906521a8dbd9ff6162f80fa9b388434
This commit is contained in:
Jeff Sharkey
2018-02-09 10:06:59 -07:00
parent c2a2f738ba
commit 1e80651d2a

View File

@@ -187,6 +187,7 @@ public class NetworkStatsCollection implements FileRotator.Reader {
*/
@VisibleForTesting
public static long multiplySafe(long value, long num, long den) {
if (den == 0) den = 1;
long x = value;
long y = num;