1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

coverity: 231739: clear false positive by needless checks

Client connection api must provide host
This commit is contained in:
Andy Green 2020-08-14 07:27:08 +01:00
parent df2f135c09
commit 4a28bc8c87

View file

@ -2398,6 +2398,8 @@ lws_h2_client_handshake(struct lws *wsi)
goto fail_length;
if (!wsi->client_h2_alpn &&
lws_hdr_simple_ptr(wsi, _WSI_TOKEN_CLIENT_HOST) && /* coverity */
lws_hdr_total_length(wsi, _WSI_TOKEN_CLIENT_HOST) && /* coverity */
lws_add_http_header_by_token(wsi, WSI_TOKEN_HOST,
(unsigned char *)lws_hdr_simple_ptr(wsi,
_WSI_TOKEN_CLIENT_HOST),