commit | 409468d773304302d6fff6e3d70bbb9ff734c5e9 | [log] [tgz] |
---|---|---|
author | tsaichristine <tsaichristine@google.com> | Mon Oct 28 11:32:31 2019 -0700 |
committer | tsaichristine <tsaichristine@google.com> | Mon Oct 28 11:32:31 2019 -0700 |
tree | 2fa5a7aeaf7529805ceb4e5f2437d983b1e85f97 | |
parent | 6db3af398f112df7953b7eed37edc99e202ffed2 [diff] [blame] |
Return false if incorrect event value type - getDoubleOrLong sets the return value if the event value type is an int, long, float, or double. If none of these types are matched, the default switch case should return false. Test: bit statsd_test:* Change-Id: I55f0bd5865810627da4fc62440f9450c0b1fa730
diff --git a/cmds/statsd/src/metrics/ValueMetricProducer.cpp b/cmds/statsd/src/metrics/ValueMetricProducer.cpp index 6fd0327..0ee156b 100644 --- a/cmds/statsd/src/metrics/ValueMetricProducer.cpp +++ b/cmds/statsd/src/metrics/ValueMetricProducer.cpp
@@ -650,6 +650,7 @@ ret.setDouble(value.mValue.double_value); break; default: + return false; break; } return true;