http2: flatten code style

pull/6433/head
Philippe Antoine 4 years ago committed by Victor Julien
parent 527415dba0
commit 42ba421ca9

@ -925,8 +925,12 @@ static AppLayerResult HTPHandleResponseData(Flow *f, void *htp_state,
if (tx != NULL && tx->response_status_number == 101) {
htp_header_t *h =
(htp_header_t *)htp_table_get_c(tx->response_headers, "Upgrade");
if (h != NULL) {
if (bstr_cmp_c(h->value, "h2c") == 0) {
if (h == NULL) {
break;
}
if (bstr_cmp_c(h->value, "h2c") != 0) {
break;
}
uint16_t dp = 0;
if (tx->request_port_number != -1) {
dp = (uint16_t)tx->request_port_number;
@ -941,8 +945,6 @@ static AppLayerResult HTPHandleResponseData(Flow *f, void *htp_state,
}
SCReturnStruct(APP_LAYER_OK);
}
}
}
break;
default:
break;

Loading…
Cancel
Save