]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: initialize new_state field when we use it
authorSage Weil <sage@inktank.com>
Wed, 29 May 2013 23:50:04 +0000 (16:50 -0700)
committerSage Weil <sage@inktank.com>
Wed, 29 May 2013 23:50:45 +0000 (16:50 -0700)
commit85ad65e294f2b3d4bd1cfef6ae613e31d1cea635
tree408105264699b83145069f049dc1d560291d5752
parent65236a4a2541799a0d946df7f3048d4404678f64
osd: initialize new_state field when we use it

If we use operator[] on a new int field its value is undefined; avoid
reading it or using |= et al until we initialize it.

Fixes: #4967
Backport: cuttlefish, bobtail
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit 50ac8917f175d1b107c18ecb025af1a7b103d634)
src/mon/OSDMonitor.cc