Remove redundant checks in http header and http client body code.

remotes/origin/master-1.1.x
Victor Julien 14 years ago
parent f1c90c29a6
commit 0a58f0728a

@ -280,9 +280,6 @@ static void DetectEngineBufferHttpClientBodies(DetectEngineCtx *de_ctx,
goto end;
}
/* it is either the first entry into this function. If it is not,
* then we just don't have any http transactions */
if (det_ctx->hcbd_buffers_list_len == 0) {
/* get the transaction id */
int tmp_idx = AppLayerTransactionGetInspectId(f);
/* error! get out of here */
@ -309,11 +306,6 @@ static void DetectEngineBufferHttpClientBodies(DetectEngineCtx *de_ctx,
}
memset(det_ctx->hcbd_buffers_len, 0, det_ctx->hcbd_buffers_list_len * sizeof(uint32_t));
} else {
/* we already have the buffer space alloted. Get out of there */
goto end;
}
for (idx = AppLayerTransactionGetInspectId(f);
i < det_ctx->hcbd_buffers_list_len; idx++, i++) {

@ -278,9 +278,6 @@ static void DetectEngineBufferHttpHeaders(DetectEngineThreadCtx *det_ctx, Flow *
goto end;
}
/* it is either the first entry into this function. If it is not,
* then we just don't have any http transactions */
if (det_ctx->hhd_buffers_list_len == 0) {
/* get the transaction id */
int tmp_idx = AppLayerTransactionGetInspectId(f);
/* error! get out of here */
@ -306,9 +303,6 @@ static void DetectEngineBufferHttpHeaders(DetectEngineThreadCtx *det_ctx, Flow *
goto end;
}
memset(det_ctx->hhd_buffers_len, 0, det_ctx->hhd_buffers_list_len * sizeof(uint32_t));
} else {
goto end;
} /* else - if (det_ctx->hhd_buffers_list_len == 0) */
for (idx = AppLayerTransactionGetInspectId(f);
i < det_ctx->hhd_buffers_list_len; idx++, i++) {

Loading…
Cancel
Save