Fixed switch case statment formatting in perf.cpp.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8f3955b5 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8f3955b5 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8f3955b5 Branch: refs/heads/master Commit: 8f3955b54f54932e31a503c2b9fec29bf26f365a Parents: 1208713 Author: Benjamin Mahler <[email protected]> Authored: Tue Sep 1 15:00:20 2015 -0700 Committer: Benjamin Mahler <[email protected]> Committed: Tue Sep 1 15:00:20 2015 -0700 ---------------------------------------------------------------------- src/linux/perf.cpp | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/8f3955b5/src/linux/perf.cpp ---------------------------------------------------------------------- diff --git a/src/linux/perf.cpp b/src/linux/perf.cpp index beb6854..a3a7f4c 100644 --- a/src/linux/perf.cpp +++ b/src/linux/perf.cpp @@ -413,30 +413,28 @@ Try<hashmap<string, mesos::PerfStatistics>> parse(const string& output) } switch (field->type()) { - case google::protobuf::FieldDescriptor::TYPE_DOUBLE: - { - Try<double> number = - (value == "<not counted>") ? 0 : numify<double>(value); + case google::protobuf::FieldDescriptor::TYPE_DOUBLE: { + Try<double> number = + (value == "<not counted>") ? 0 : numify<double>(value); - if (number.isError()) { - return Error("Unable to parse perf value at line: " + line); - } - - reflection->SetDouble(&(statistics[cgroup]), field, number.get()); - break; + if (number.isError()) { + return Error("Unable to parse perf value at line: " + line); } - case google::protobuf::FieldDescriptor::TYPE_UINT64: - { - Try<uint64_t> number = - (value == "<not counted>") ? 0 : numify<uint64_t>(value); - if (number.isError()) { - return Error("Unable to parse perf value at line: " + line); - } + reflection->SetDouble(&(statistics[cgroup]), field, number.get()); + break; + } + case google::protobuf::FieldDescriptor::TYPE_UINT64: { + Try<uint64_t> number = + (value == "<not counted>") ? 0 : numify<uint64_t>(value); - reflection->SetUInt64(&(statistics[cgroup]), field, number.get()); - break; + if (number.isError()) { + return Error("Unable to parse perf value at line: " + line); } + + reflection->SetUInt64(&(statistics[cgroup]), field, number.get()); + break; + } default: return Error("Unsupported perf field type at line: " + line); }
