From: Lukas Sismis Date: Mon, 9 Jun 2025 08:05:54 +0000 (+0200) Subject: runmodes: remove redundant NULL check X-Git-Tag: suricata-8.0.0-rc1~123 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b71bb41bc5d32709b433fd9a014cd6a63dff3358;p=thirdparty%2Fsuricata.git runmodes: remove redundant NULL check Ticket: 7747 --- diff --git a/src/util-runmodes.c b/src/util-runmodes.c index 53ff10a7fd..71a926317c 100644 --- a/src/util-runmodes.c +++ b/src/util-runmodes.c @@ -288,13 +288,9 @@ static int RunModeSetLiveCaptureWorkersForDevice(ConfigIfaceThreadsCountFunc Mod FatalError("TmThreadsCreate failed"); } tv->printable_name = printable_threadname; - if (live_dev) { - tv->iface_name = SCStrdup(live_dev); - if (tv->iface_name == NULL) { - FatalError("Failed to allocate memory for iface name"); - } - } else { - tv->iface_name = NULL; + tv->iface_name = SCStrdup(live_dev); + if (tv->iface_name == NULL) { + FatalError("Failed to allocate memory for iface name"); } tm_module = TmModuleGetByName(recv_mod_name);