From 936c83db957805dec91b70379780241f0c75a3f6 Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Tue, 9 Jul 2024 15:23:45 +0200 Subject: [PATCH] http_static: fix coverity warning Type: fix Change-Id: Ie4af8ec0c6089b5719899f3d0b670f8a2de7f8a2 Signed-off-by: Matus Fabian --- src/plugins/http_static/static_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/http_static/static_server.c b/src/plugins/http_static/static_server.c index bc18875626e..d987a3eb7fb 100644 --- a/src/plugins/http_static/static_server.c +++ b/src/plugins/http_static/static_server.c @@ -151,7 +151,7 @@ start_send_data (hss_session_t *hs, http_status_code_t status) if (rv != hs->data_len) { - hs->data_offset = rv; + hs->data_offset = (rv > 0) ? rv : 0; svm_fifo_add_want_deq_ntf (ts->tx_fifo, SVM_FIFO_WANT_DEQ_NOTIF); } -- 2.16.6