Fix some unitialized fields in modules.

They are not used before OnLoad anyway, but Coverity will be happier.
This commit is contained in:
Alexey Sokolov
2015-10-30 14:52:51 +00:00
parent c8edabb035
commit 096dc5b320
10 changed files with 31 additions and 34 deletions

View File

@@ -31,6 +31,13 @@ public:
MODCONSTRUCTOR(CSASLAuthMod) {
m_Cache.SetTTL(60000/*ms*/);
m_cbs[0].id = SASL_CB_GETOPT;
m_cbs[0].proc = reinterpret_cast<int(*)()>(CSASLAuthMod::getopt);
m_cbs[0].context = this;
m_cbs[1].id = SASL_CB_LIST_END;
m_cbs[1].proc = NULL;
m_cbs[1].context = NULL;
AddHelpCommand();
AddCommand("CreateUser", static_cast<CModCommand::ModCmdFunc>(&CSASLAuthMod::CreateUserCommand),
"[yes|no]");
@@ -77,13 +84,6 @@ public:
return false;
}
m_cbs[0].id = SASL_CB_GETOPT;
m_cbs[0].proc = reinterpret_cast<int(*)()>(CSASLAuthMod::getopt);
m_cbs[0].context = this;
m_cbs[1].id = SASL_CB_LIST_END;
m_cbs[1].proc = NULL;
m_cbs[1].context = NULL;
return true;
}