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

coverity: fixes

This commit is contained in:
Andy Green 2019-06-08 10:29:08 +01:00
parent 4692c1a7ee
commit 69fbc272f0
3 changed files with 19 additions and 4 deletions

View file

@ -192,6 +192,13 @@ lwsl_info("context created\n");
#endif
#endif
if (context->max_fds < 0) {
lwsl_err("%s: problem getting process max files\n",
__func__);
return NULL;
}
if (info->count_threads)
context->count_threads = info->count_threads;
else

View file

@ -646,7 +646,11 @@ utf8_fail:
/* if pmd not enabled, in == out */
if (n == PMDR_DID_NOTHING || n == PMDR_UNKNOWN)
if (n == PMDR_DID_NOTHING
#if !defined(LWS_WITHOUT_EXTENSIONS)
|| n == PMDR_UNKNOWN
#endif
)
pmdrx.eb_in.len -= pmdrx.eb_out.len;
m = wsi->protocol->callback(wsi,

View file

@ -692,11 +692,15 @@ utf8_fail:
/* if pmd not enabled, in == out */
if (n == PMDR_DID_NOTHING ||
n == PMDR_UNKNOWN)
if (n == PMDR_DID_NOTHING
#if !defined(LWS_WITHOUT_EXTENSIONS)
||
n == PMDR_UNKNOWN
#endif
)
pmdrx.eb_in.len -= pmdrx.eb_out.len;
if (!wsi->wsistate_pre_close &&
if (!wsi->wsistate_pre_close &&
(pmdrx.eb_out.len >= 0 ||
callback_action == LWS_CALLBACK_RECEIVE_PONG ||
n == PMDR_EMPTY_FINAL)) {