From: Bartosz Biłas Date: Fri, 19 Jun 2020 02:14:42 +0000 (+0200) Subject: src/http.c: fix checking pss's len member (#385) X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=31c0dff0295f35ca0eb513a7dd1c9168668999c6;p=ttyd.git 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 --- diff --git a/src/http.c b/src/http.c index 3297c5c..461df49 100644 --- a/src/http.c +++ b/src/http.c @@ -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; }