From 9fc1250ca8c3a07d4819a274a843a230954a0ac4 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 28 May 2018 16:00:18 -0600 Subject: [PATCH] app-layer-detect-proto: remove unnecessary gotos --- src/app-layer-detect-proto.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index 6ef06d3083..cd4ad19f6c 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -1654,13 +1654,9 @@ void AppLayerProtoDetectRegisterProtocol(AppProto alproto, const char *alproto_n { SCEnter(); - if (alpd_ctx.alproto_names[alproto] != NULL) - goto end; - - alpd_ctx.alproto_names[alproto] = alproto_name; + if (alpd_ctx.alproto_names[alproto] == NULL) + alpd_ctx.alproto_names[alproto] = alproto_name; - goto end; - end: SCReturn; }