Skip to content

Commit cfdb972

Browse files
committed
Fix warning _webui_is_mg_client_valid
1 parent 7245114 commit cfdb972

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webui.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ static bool _webui_set_root_folder(_webui_window_t* win, const char* path);
567567
static const char* _webui_generate_js_bridge(_webui_window_t* win, struct mg_connection* client);
568568
static void _webui_free_mem(void * ptr);
569569
static bool _webui_file_exist_mg(_webui_window_t* win, struct mg_connection* client);
570-
static bool _webui_is_mg_client_valid(_webui_window_t* win, struct mg_connection* client);
570+
static bool _webui_is_mg_client_valid(_webui_window_t* win, const struct mg_connection* client);
571571
static bool _webui_file_exist(const char* path);
572572
static void _webui_free_all_mem(void);
573573
static bool _webui_show_window(_webui_window_t* win, struct mg_connection* client,
@@ -4843,7 +4843,7 @@ static size_t _webui_strlen(const char* s) {
48434843
return length;
48444844
}
48454845

4846-
static bool _webui_is_mg_client_valid(_webui_window_t* win, struct mg_connection* client) {
4846+
static bool _webui_is_mg_client_valid(_webui_window_t* win, const struct mg_connection* client) {
48474847
// The `mg_get_xxx()` functions may crash if the client is not valid.
48484848
// So we need to check if the server is still running. Otherwise,
48494849
// we consider the client is freed and invalid.

0 commit comments

Comments
 (0)