From 8960a86f4fcc2e306fbf4de9a2b4550a7e8a35d3 Mon Sep 17 00:00:00 2001 From: Shivani Bhardwaj Date: Tue, 21 Nov 2023 13:53:09 +0530 Subject: [PATCH] detect/port: remove BUG_ON in favor of PORT_ER Either the BUG_ON condition would hit or PORT_ER. Prefer to return error in case of an error as the fn expects that. --- src/detect-engine-port.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/detect-engine-port.c b/src/detect-engine-port.c index 04d2a49d55..86a367d376 100644 --- a/src/detect-engine-port.c +++ b/src/detect-engine-port.c @@ -594,9 +594,6 @@ int DetectPortCmp(DetectPort *a, DetectPort *b) } else if (a_port1 > b_port2) { //SCLogDebug("PORT_GT"); return PORT_GT; - } else { - /* should be unreachable */ - BUG_ON(1); } return PORT_ER;