detect/byte_extract: use list util in tests

pull/8732/head
Victor Julien 2 years ago
parent 9e098020c9
commit a718f19b0e

@ -1707,7 +1707,7 @@ static int DetectByteExtractTest37(void)
goto end;
}
sm = s->sm_lists[g_http_uri_buffer_id];
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -1820,7 +1820,7 @@ static int DetectByteExtractTest38(void)
goto end;
}
sm = s->sm_lists[g_http_uri_buffer_id];
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -1908,7 +1908,7 @@ static int DetectByteExtractTest39(void)
goto end;
}
sm = s->sm_lists[g_http_uri_buffer_id];
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -2021,7 +2021,7 @@ static int DetectByteExtractTest40(void)
goto end;
}
sm = s->sm_lists[g_http_uri_buffer_id];
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -2253,7 +2253,7 @@ static int DetectByteExtractTest42(void)
if (sm->next != NULL)
goto end;
sm = s->sm_lists[g_http_uri_buffer_id];
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -3792,7 +3792,7 @@ static int DetectByteExtractTest56(void)
goto end;
}
sm = s->sm_lists[g_http_uri_buffer_id];
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -3964,7 +3964,7 @@ static int DetectByteExtractTest57(void)
if (sm->next != NULL)
goto end;
sm = s->sm_lists[g_http_uri_buffer_id];
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -4427,12 +4427,11 @@ static int DetectByteExtractTest60(void)
if (sm->next != NULL)
goto end;
if (s->sm_lists_tail[g_http_uri_buffer_id] == NULL) {
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm == NULL) {
result = 0;
goto end;
}
sm = s->sm_lists[g_http_uri_buffer_id];
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -4557,12 +4556,11 @@ static int DetectByteExtractTest61(void)
if (sm->next != NULL)
goto end;
if (s->sm_lists_tail[g_http_uri_buffer_id] == NULL) {
sm = DetectBufferGetFirstSigMatch(s, g_http_uri_buffer_id);
if (sm == NULL) {
result = 0;
goto end;
}
sm = s->sm_lists[g_http_uri_buffer_id];
if (sm->type != DETECT_CONTENT) {
result = 0;
goto end;
@ -4644,13 +4642,11 @@ static int DetectByteExtractTest62(void)
goto end;
}
if (s->sm_lists_tail[g_file_data_buffer_id] == NULL) {
sm = DetectBufferGetFirstSigMatch(s, g_file_data_buffer_id);
if (sm == NULL) {
goto end;
}
sm = s->sm_lists[g_file_data_buffer_id];
if (sm->type != DETECT_BYTE_EXTRACT) {
result = 0;
goto end;
}
bed = (DetectByteExtractData *)sm->ctx;

Loading…
Cancel
Save