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

coverity 189197: workaround false cov detect

There's nothing wrong with ignoring the ringbuf filling.

But coverity infers there is because elsewhere under other
circumstances we report it.
This commit is contained in:
Andy Green 2018-04-06 11:29:35 +08:00
parent e9931680c8
commit d830185df9

View file

@ -205,7 +205,8 @@ ssh_ops_rx(void *_priv, struct lws *wsi, const uint8_t *buf, uint32_t len)
if (write(fd, buf, len) != len)
return -1;
if (priv->pty_in_echo) {
lws_ring_insert(priv->ring_stdout, buf, 1);
if (!lws_ring_insert(priv->ring_stdout, buf, 1))
lwsl_notice("dropping...\n");
lws_callback_on_writable(wsi);
}
} else {
@ -217,7 +218,8 @@ ssh_ops_rx(void *_priv, struct lws *wsi, const uint8_t *buf, uint32_t len)
if (priv->pty_in_echo) {
bbuf[0] = 0x0d;
bbuf[1] = 0x0a;
lws_ring_insert(priv->ring_stdout, bbuf, 2);
if (!lws_ring_insert(priv->ring_stdout, bbuf, 2))
lwsl_notice("dropping...\n");
lws_callback_on_writable(wsi);
}
}