libmicrohttpd2

HTTP server C library (MHD 2.x, alpha)
Log | Files | Refs | README | LICENSE

commit 6d53267a51c91fb6b8cf7ead3c5ba27bab5489b6
parent 331b046e4df7b0d9bdbc93edf16f62f157301542
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date:   Fri, 13 Jun 2025 23:35:39 +0200

perf_replies: fixed formatting

Diffstat:
Msrc/tools/perf_replies.c | 54+++++++++++++++++++++++++++++-------------------------
1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/src/tools/perf_replies.c b/src/tools/perf_replies.c @@ -502,6 +502,8 @@ process_param__thread_per_conn (const char *param_name) return '-' == param_name[1] ? PERF_RPL_PARAM_FULL_STR :PERF_RPL_PARAM_ONE_CHAR; } + + #endif /* disabled code */ @@ -1129,6 +1131,7 @@ check_apply_param__threads (void) } } + #if 0 /* disabled code */ /** @@ -1151,6 +1154,8 @@ check_apply_param__thread_per_conn (void) return ! 0; } + + #endif /* disabled code */ @@ -1356,19 +1361,19 @@ create_reusable_response_object (void) struct MHD_Response *r; if (NULL != body_dyn) r = MHD_response_from_buffer_static (MHD_HTTP_STATUS_OK, - body_dyn_size, - body_dyn); + body_dyn_size, + body_dyn); else if (tool_params.empty) r = MHD_response_from_empty (MHD_HTTP_STATUS_OK); else - r = MHD_response_from_buffer_static (MHD_HTTP_STATUS_OK, - mhd_SSTR_LEN (tiny_body), - tiny_body); + r = MHD_response_from_buffer_static (MHD_HTTP_STATUS_OK, + mhd_SSTR_LEN (tiny_body), + tiny_body); if (NULL != r) { if (MHD_SC_OK != - MHD_RESPONSE_SET_OPTIONS(r, - MHD_R_OPTION_REUSABLE (MHD_YES))) + MHD_RESPONSE_SET_OPTIONS (r, + MHD_R_OPTION_REUSABLE (MHD_YES))) { MHD_response_destroy (r); r = NULL; @@ -1475,10 +1480,10 @@ deinit_data (void) MHD_FN_PAR_NONNULL_ (2) MHD_FN_PAR_NONNULL_ (3) static const struct MHD_Action * answer_shared_response (void *cls, - struct MHD_Request *MHD_RESTRICT request, - const struct MHD_String *MHD_RESTRICT path, - enum MHD_HTTP_Method method, - uint_fast64_t upload_size) + struct MHD_Request *MHD_RESTRICT request, + const struct MHD_String *MHD_RESTRICT path, + enum MHD_HTTP_Method method, + uint_fast64_t upload_size) { unsigned int resp_index; static volatile unsigned int last_index = 0; @@ -1560,10 +1565,10 @@ answer_unique_tiny_response (void *cls, return MHD_action_from_response ( - request, - MHD_response_from_buffer_static (MHD_HTTP_STATUS_OK, - mhd_SSTR_LEN (tiny_body), - tiny_body)); + request, + MHD_response_from_buffer_static (MHD_HTTP_STATUS_OK, + mhd_SSTR_LEN (tiny_body), + tiny_body)); } @@ -1585,10 +1590,10 @@ answer_unique_dyn_response (void *cls, return MHD_action_from_response ( - request, - MHD_response_from_buffer_static (MHD_HTTP_STATUS_OK, - body_dyn_size, - body_dyn)); + request, + MHD_response_from_buffer_static (MHD_HTTP_STATUS_OK, + body_dyn_size, + body_dyn)); } @@ -1596,7 +1601,7 @@ static void print_perf_warnings (void) { int newline_needed = 0; -#if !defined(NDEBUG) || defined(_DEBUG) +#if ! defined(NDEBUG) || defined(_DEBUG) fprintf (stderr, "WARNING: Running with debug asserts enabled, " "the performance is suboptimal.\n"); newline_needed |= ! 0; @@ -1628,7 +1633,6 @@ print_perf_warnings (void) } - static const char * get_mhd_poll_func_name (struct MHD_Daemon *d) { @@ -1804,7 +1808,7 @@ run_mhd (void) opt_arr[opt_count++] = MHD_D_OPTION_WM_WORKER_THREADS (num_requsted_threads); if (! tool_params.date_header) - opt_arr[opt_count++] = MHD_D_OPTION_SUPPRESS_DATE_HEADER(MHD_YES); + opt_arr[opt_count++] = MHD_D_OPTION_SUPPRESS_DATE_HEADER (MHD_YES); if (0 != tool_params.connections) opt_arr[opt_count++] = @@ -1824,8 +1828,8 @@ run_mhd (void) } if (MHD_SC_OK != MHD_daemon_set_options (d, - opt_arr, - opt_count)) + opt_arr, + opt_count)) { fprintf (stderr, "Error setting daemon options.\n"); MHD_daemon_destroy (d); @@ -1866,7 +1870,7 @@ run_mhd (void) 0 == def_timeout ? " (no timeout)" : ""); } printf (" 'Date:' header: %s\n", - (! get_mhd_suppr_date(d)) ? "Yes" : "No"); + (! get_mhd_suppr_date (d)) ? "Yes" : "No"); if (0 != port) { printf ("To test with remote client use\n"