From 9e5e7084e665a6cc1c927ffd509a8b29677784d7 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Sat, 26 Oct 2019 13:26:07 +0200 Subject: [PATCH] Remove always false condition in plugin/Manager `((m->second + "/").empty())` always evaluates to false. Combine it with the previously check. --- src/plugin/Manager.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/plugin/Manager.cc b/src/plugin/Manager.cc index ce13397046..08321b0f1d 100644 --- a/src/plugin/Manager.cc +++ b/src/plugin/Manager.cc @@ -159,19 +159,15 @@ bool Manager::ActivateDynamicPluginInternal(const std::string& name, bool ok_if_ return false; } - if ( m->second == "" ) - // Already activated. - return true; - - std::string dir = m->second + "/"; - - if ( dir.empty() ) + if ( m->second.empty() ) { // That's our marker that we have already activated this // plugin. Silently ignore the new request. return true; } + std::string dir = m->second + "/"; + DBG_LOG(DBG_PLUGINS, "Activating plugin %s", name.c_str()); // Add the "scripts" and "bif" directories to ZEEKPATH.