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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user