mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
ConfigKeyService.cc: move assert before first deref
Fix for: [src/mon/ConfigKeyService.cc:94] -> [src/mon/ConfigKeyService.cc:100]: (warning) Possible null pointer dereference: m - otherwise it is redundant to check it against null. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
parent
742feec7bc
commit
7a7248d952
@ -91,13 +91,14 @@ void ConfigKeyService::store_list(stringstream &ss)
|
||||
bool ConfigKeyService::service_dispatch(MonOpRequestRef op)
|
||||
{
|
||||
Message *m = op->get_req();
|
||||
assert(m != NULL);
|
||||
dout(10) << __func__ << " " << *m << dendl;
|
||||
|
||||
if (!in_quorum()) {
|
||||
dout(1) << __func__ << " not in quorum -- ignore message" << dendl;
|
||||
return false;
|
||||
}
|
||||
|
||||
assert(m != NULL);
|
||||
assert(m->get_type() == MSG_MON_COMMAND);
|
||||
|
||||
MMonCommand *cmd = static_cast<MMonCommand*>(m);
|
||||
|
Loading…
Reference in New Issue
Block a user