Skip to content

Commit

Permalink
Initialize all doubles to 0 in histogram.cc
Browse files Browse the repository at this point in the history
Summary:
The existing code did not initialize a few doubles in histogram.cc.
Cropped up when I wrote a unit-test.

Test Plan: make all check

Reviewers: chip

Reviewed By: chip

CC: leveldb

Differential Revision: https://reviews.facebook.net/D8319
  • Loading branch information
Abhishek Kona committed Feb 1, 2013
1 parent 009034c commit 4dc02f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions util/histogram.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ namespace {


Histogram::Histogram() :
min_(bucketMapper.LastValue()),
max_(0),
num_(0),
sum_(0),
sum_squares_(0),
buckets_(std::vector<uint64_t>(bucketMapper.BucketCount(), 0)) {}

void Histogram::Clear() {
Expand Down

0 comments on commit 4dc02f7

Please sign in to comment.