From d3d4eacfb430dab75e26f32075513b3238effaa9 Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Sun, 29 May 2011 19:02:10 +0530 Subject: [PATCH] coverity - detect-engine-sigorder.c - remove some dummy null checks --- src/detect-engine-sigorder.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/detect-engine-sigorder.c b/src/detect-engine-sigorder.c index a2004eae67..4b241c322f 100644 --- a/src/detect-engine-sigorder.c +++ b/src/detect-engine-sigorder.c @@ -321,8 +321,6 @@ static void SCSigOrderByAction(DetectEngineCtx *de_ctx, } /* set the min signature for this keyword, for the next ordering function */ - if (sw == NULL) - return; min = sw; while (min != NULL && min != sw->min) { if (min->sig->action != sw->sig->action) @@ -333,8 +331,6 @@ static void SCSigOrderByAction(DetectEngineCtx *de_ctx, sw->min = min; /* set the max signature for this keyword + 1, for the next ordering func */ - if (sw == NULL) - return; max = sw; while (max != NULL && max != sw->max) { if (max->sig->action != sw->sig->action) @@ -426,8 +422,6 @@ static void SCSigOrderByFlowbits(DetectEngineCtx *de_ctx, } /* set the min signature for this keyword, for the next ordering function */ - if (sw == NULL) - return; min = sw; while (min != NULL && min != sw->min) { if ( *((int *)(sw->user[SC_RADIX_USER_DATA_FLOWBITS])) != @@ -439,8 +433,6 @@ static void SCSigOrderByFlowbits(DetectEngineCtx *de_ctx, sw->min = min; /* set the max signature for this keyword + 1, for the next ordering func */ - if (sw == NULL) - return; max = sw; while (max!= NULL && max != sw->max) { if ( *((int *)(sw->user[SC_RADIX_USER_DATA_FLOWBITS])) != @@ -534,8 +526,6 @@ static void SCSigOrderByFlowvar(DetectEngineCtx *de_ctx, } /* set the min signature for this keyword, for the next ordering function */ - if (sw == NULL) - return; min = sw; while (min != NULL && min != sw->min) { if ( *((int *)(sw->user[SC_RADIX_USER_DATA_FLOWVAR])) != @@ -547,8 +537,6 @@ static void SCSigOrderByFlowvar(DetectEngineCtx *de_ctx, sw->min = min; /* set the max signature for this keyword + 1, for the next ordering func */ - if (sw == NULL) - return; max = sw; while (max != NULL && max != sw->max) { if ( *((int *)(sw->user[SC_RADIX_USER_DATA_FLOWVAR])) != @@ -640,9 +628,6 @@ static void SCSigOrderByPktvar(DetectEngineCtx *de_ctx, } /* set the min signature for this keyword, for the next ordering function */ - if (sw == NULL) - return; - min = sw; while (min != NULL && min != sw->min) { if ( *((int *)(sw->user[SC_RADIX_USER_DATA_PKTVAR])) != @@ -654,8 +639,6 @@ static void SCSigOrderByPktvar(DetectEngineCtx *de_ctx, sw->min = min; /* set the max signature for this keyword + 1, for the next ordering func */ - if (sw == NULL) - return; max = sw; while (max != NULL && max != sw->max) { if ( *((int *)(sw->user[SC_RADIX_USER_DATA_PKTVAR])) != @@ -747,9 +730,6 @@ static void SCSigOrderByPriority(DetectEngineCtx *de_ctx, } /* set the min signature for this keyword, for the next ordering function */ - if (sw == NULL) - return; - min = sw; while (min != NULL && min != sw->min) { if (min->sig->prio != sw->sig->prio) @@ -760,9 +740,6 @@ static void SCSigOrderByPriority(DetectEngineCtx *de_ctx, sw->min = min; /* set the max signature for this keyword + 1, for the next ordering func */ - if (sw == NULL) - return; - max = sw; while (max != NULL && max != sw->max) { if (max->sig->prio != sw->sig->prio)