Skip to content
Snippets Groups Projects
Commit a27dfb2a authored by Andy Green's avatar Andy Green
Browse files

clean: coverity

parent 253942ca
Branches
Tags
No related merge requests found
...@@ -84,7 +84,7 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len) ...@@ -84,7 +84,7 @@ int lws_issue_raw(struct lws *wsi, unsigned char *buf, size_t len)
lwsl_debug("%s: draining %d\n", __func__, (int)len); lwsl_debug("%s: draining %d\n", __func__, (int)len);
} }
if (!len) if (!len || !buf)
return 0; return 0;
if (!wsi->http2_substream && !lws_socket_is_valid(wsi->desc.sockfd)) if (!wsi->http2_substream && !lws_socket_is_valid(wsi->desc.sockfd))
......
...@@ -362,6 +362,9 @@ rops_write_role_protocol_h2(struct lws *wsi, unsigned char *buf, size_t len, ...@@ -362,6 +362,9 @@ rops_write_role_protocol_h2(struct lws *wsi, unsigned char *buf, size_t len,
unsigned char flags = 0, base = (*wp) & 0x1f; unsigned char flags = 0, base = (*wp) & 0x1f;
size_t olen = len; size_t olen = len;
int n; int n;
#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
unsigned char mtubuf[1450 + LWS_PRE];
#endif
/* if not in a state to send stuff, then just send nothing */ /* if not in a state to send stuff, then just send nothing */
...@@ -386,7 +389,7 @@ rops_write_role_protocol_h2(struct lws *wsi, unsigned char *buf, size_t len, ...@@ -386,7 +389,7 @@ rops_write_role_protocol_h2(struct lws *wsi, unsigned char *buf, size_t len,
#if defined(LWS_WITH_HTTP_STREAM_COMPRESSION) #if defined(LWS_WITH_HTTP_STREAM_COMPRESSION)
if (wsi->http.lcs) { if (wsi->http.lcs) {
unsigned char mtubuf[1450 + LWS_PRE], *out = mtubuf + LWS_PRE; unsigned char *out = mtubuf + LWS_PRE;
size_t o = sizeof(mtubuf) - LWS_PRE; size_t o = sizeof(mtubuf) - LWS_PRE;
n = lws_http_compression_transform(wsi, buf, len, wp, &out, &o); n = lws_http_compression_transform(wsi, buf, len, wp, &out, &o);
......
...@@ -587,7 +587,7 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin, ...@@ -587,7 +587,7 @@ lws_http_serve(struct lws *wsi, char *uri, const char *origin,
/* but we still need to send cache control... */ /* but we still need to send cache control... */
if (m && m->cache_max_age && m->cache_reusable) { if (m->cache_max_age && m->cache_reusable) {
if (!m->cache_revalidate) { if (!m->cache_revalidate) {
cc = cache_control; cc = cache_control;
cclen = sprintf(cache_control, "%s, max-age=%u", cclen = sprintf(cache_control, "%s, max-age=%u",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment