From 2d22f149180ba28186cf142ec30dc91c841d0328 Mon Sep 17 00:00:00 2001 From: stderr64 Date: Tue, 9 Apr 2024 19:17:04 +0300 Subject: Just making sure 64-bit signed integer is used for ev_count --- https_server.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/https_server.h b/https_server.h index 8f5381d..80fb77a 100644 --- a/https_server.h +++ b/https_server.h @@ -16,9 +16,9 @@ void clear_client_ip( client_info_t *clf ){ } void https_server_event_loop( server_socket_t *sv, client_info_t *cl, server_config_t *svcfg, webhooks_data_t *wdata, http_request_data_t *http_req_data, log_file_t *logf ){ - int ev_count = 0; + int64_t ev_count = 0; socklen_t cl_info_len = (socklen_t)sizeof( sv->client_info ); - while ( (ev_count = poll(sv->pstruct, 1, 0)) != -1 ){ + while ( (ev_count = (int64_t)poll(sv->pstruct, 1, 0)) != -1 ){ if ( (ev_count > 0) && sv->pstruct->revents & POLLIN ){ sv->client_socket_fd = accept( sv->socket_fd, (struct sockaddr*)&sv->client_info, &cl_info_len ); if ( sv->client_socket_fd == -1 ){ -- cgit v1.2.3-86-g962b