src/http.c: fix checking pss's len member (#385)

len member is a size_t type so it can't be less than 0 by definition.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
This commit is contained in:
Bartosz Biłas
2020-06-19 04:14:42 +02:00
committed by GitHub
parent 890b97cf7b
commit 31c0dff029

View File

@@ -212,7 +212,7 @@ int callback_http(struct lws *wsi, enum lws_callback_reasons reason, void *user,
break;
case LWS_CALLBACK_HTTP_WRITEABLE:
if (!pss->buffer || pss->len <= 0) {
if (!pss->buffer || pss->len == 0) {
goto try_to_reuse;
}