From: Artem Boldariev Date: Wed, 19 Feb 2025 10:28:37 +0000 (+0200) Subject: DoH: http_send_outgoing() return value is not used X-Git-Tag: ondrej/lock-free-qpzone-reads-v1~49^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2adabe835a290c021948a43a4c2c25ce2806aef2;p=thirdparty%2Fbind9.git DoH: http_send_outgoing() return value is not used The value returned by http_send_outgoing() is not used anywhere, so we make it not return anything (void). Probably it is an omission from older times. --- diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index f18f972ff62..39beec04873 100644 --- a/lib/isc/netmgr/http.c +++ b/lib/isc/netmgr/http.c @@ -232,7 +232,7 @@ typedef struct isc_http_send_req { #define HTTP_HANDLER_MAGIC ISC_MAGIC('H', 'T', 'H', 'L') #define VALID_HTTP_HANDLER(t) ISC_MAGIC_VALID(t, HTTP_HANDLER_MAGIC) -static bool +static void http_send_outgoing(isc_nm_http_session_t *session, isc_nmhandle_t *httphandle, isc_nm_cb_t cb, void *cbarg); @@ -1383,7 +1383,7 @@ http_append_pending_send_request(isc_nm_http_session_t *session, ISC_LIST_APPEND(session->pending_write_callbacks, newcb, link); } -static bool +static void http_send_outgoing(isc_nm_http_session_t *session, isc_nmhandle_t *httphandle, isc_nm_cb_t cb, void *cbarg) { isc_http_send_req_t *send = NULL; @@ -1405,7 +1405,7 @@ http_send_outgoing(isc_nm_http_session_t *session, isc_nmhandle_t *httphandle, isc__nm_sendcb(httphandle->sock, req, ISC_R_CANCELED, true); } - return false; + return; } else if (!nghttp2_session_want_write(session->ngsession) && session->pending_write_data == NULL) { @@ -1413,7 +1413,7 @@ http_send_outgoing(isc_nm_http_session_t *session, isc_nmhandle_t *httphandle, http_append_pending_send_request(session, httphandle, cb, cbarg); } - return false; + return; } /* @@ -1556,11 +1556,10 @@ http_send_outgoing(isc_nm_http_session_t *session, isc_nmhandle_t *httphandle, isc_buffer_usedregion(send->pending_write_data, &send_data); session->data_in_flight += send_data.length; isc_nm_send(transphandle, &send_data, http_writecb, send); - return true; + return; nothing_to_send: isc_nmhandle_detach(&transphandle); - return false; } static inline bool @@ -1616,8 +1615,8 @@ http_do_bio(isc_nm_http_session_t *session, isc_nmhandle_t *send_httphandle, if (send_cb != NULL) { INSIST(VALID_NMHANDLE(send_httphandle)); - (void)http_send_outgoing(session, send_httphandle, send_cb, - send_cbarg); + http_send_outgoing(session, send_httphandle, send_cb, + send_cbarg); return; } @@ -1626,7 +1625,7 @@ http_do_bio(isc_nm_http_session_t *session, isc_nmhandle_t *send_httphandle, INSIST(send_cbarg == NULL); if (session->pending_write_data != NULL && session->sending == 0) { - (void)http_send_outgoing(session, NULL, NULL, NULL); + http_send_outgoing(session, NULL, NULL, NULL); return; } @@ -1681,8 +1680,7 @@ http_do_bio(isc_nm_http_session_t *session, isc_nmhandle_t *send_httphandle, */ http_do_bio_async(session); } else { - (void)http_send_outgoing(session, NULL, NULL, - NULL); + http_send_outgoing(session, NULL, NULL, NULL); } isc__nm_httpsession_detach(&tmpsess); @@ -1700,7 +1698,7 @@ http_do_bio(isc_nm_http_session_t *session, isc_nmhandle_t *send_httphandle, } /* we might have some data to send after processing */ - (void)http_send_outgoing(session, NULL, NULL, NULL); + http_send_outgoing(session, NULL, NULL, NULL); if (nghttp2_session_want_read(session->ngsession) == 0 && nghttp2_session_want_write(session->ngsession) == 0 &&