From 049c898aad7de0fe7553468bfe417386d6ea92ee Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 13 Jul 2019 11:32:15 -0700 Subject: [PATCH] COVA10417: help coverity see no problem This isn't strange if coverity could understand the preprocessor options --- lib/roles/h1/ops-h1.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/roles/h1/ops-h1.c b/lib/roles/h1/ops-h1.c index f73845588..aa6a62599 100644 --- a/lib/roles/h1/ops-h1.c +++ b/lib/roles/h1/ops-h1.c @@ -944,12 +944,18 @@ rops_client_bind_h1(struct lws *wsi, const struct lws_client_connect_info *i) * When we do get the ah, now or later, he will end up at * lws_http_client_connect_via_info2(). */ - if (lws_header_table_attach(wsi, 0) < 0) + if (lws_header_table_attach(wsi, 0) +#ifndef LWS_NO_CLIENT + < 0) /* * if we failed here, the connection is already closed * and freed. */ return -1; +#else + ) + return 0; +#endif return 0; }