Skip to content

Commit

Permalink
mds: MDirUpdate: initialize discover count to 0 if we're not discovering
Browse files Browse the repository at this point in the history
Otherwise it's left uninitialized and could do who-knows-what!

CID 1244229:  Uninitialized scalar field  (UNINIT_CTOR)
/messages/MDirUpdate.h: 55 in MDirUpdate::MDirUpdate(mds_rank_t, dirfrag_t,
int, std::set<int, std::less<int>, std::allocator<int>> &, filepath &, bool)()

Signed-off-by: Greg Farnum <[email protected]>
  • Loading branch information
gregsfortytwo committed Oct 9, 2014
1 parent 2a9ed93 commit aa138eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/messages/MDirUpdate.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class MDirUpdate : public Message {
this->dir_rep = dir_rep;
this->dir_rep_by = dir_rep_by;
if (discover) this->discover = 5;
else this->discover = 0;
this->path = path;
}
private:
Expand Down

0 comments on commit aa138eb

Please sign in to comment.