commit | d9db08c4a12d6a2953b597d39bb3ac37c43d3658 | [log] [tgz] |
---|---|---|
author | Lorenzo Colitti <lorenzo@google.com> | Fri Apr 28 11:06:40 2017 +0900 |
committer | Lorenzo Colitti <lorenzo@google.com> | Fri Apr 28 17:31:09 2017 +0900 |
tree | 87c08c19960c70e4c3edb05eb22043bed8733b12 | |
parent | f4dfa682f436398d74e8b55d610b8cca53877246 [diff] |
Simplify enums in BandwidthController. 1. Ensure that the code always uses all enum values. This provides a clear compile-time error if a passed-in enum value is not handled, and allows us to remove several default case labels and unreachable error logging code. 2. Factor out to common functions the code that converts enum values to parts of iptables command lines. Bug: 32073253 Test: netd_{unit,integration}_test pass Change-Id: I7136055100dc312fa7cb8bba5506fe86412b1f4d