From b71bb41bc5d32709b433fd9a014cd6a63dff3358 Mon Sep 17 00:00:00 2001 From: Lukas Sismis Date: Mon, 9 Jun 2025 10:05:54 +0200 Subject: [PATCH] runmodes: remove redundant NULL check Ticket: 7747 --- src/util-runmodes.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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);