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.
pull/9964/head
Shivani Bhardwaj 3 years ago committed by Victor Julien
parent d8a887e518
commit 8960a86f4f

@ -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;

Loading…
Cancel
Save