mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
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:
parent
691fd5c9a4
commit
9e5e7084e6
1 changed files with 3 additions and 7 deletions
|
@ -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.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue