Remove always false condition in plugin/Manager

`((m->second + "/").empty())` always evaluates to false. Combine
it with the previously check.
This commit is contained in:
Arne Welzel 2019-10-26 13:26:07 +02:00
parent 691fd5c9a4
commit 9e5e7084e6

View file

@ -159,19 +159,15 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_
return false; return false;
} }
if ( m->second == "" ) if ( m->second.empty() )
// Already activated.
return true;
std::string dir = m->second + "/";
if ( dir.empty() )
{ {
// That's our marker that we have already activated this // That's our marker that we have already activated this
// plugin. Silently ignore the new request. // plugin. Silently ignore the new request.
return true; return true;
} }
std::string dir = m->second + "/";
DBG_LOG(DBG_PLUGINS, "Activating plugin %s", name.c_str()); DBG_LOG(DBG_PLUGINS, "Activating plugin %s", name.c_str());
// Add the "scripts" and "bif" directories to ZEEKPATH. // Add the "scripts" and "bif" directories to ZEEKPATH.