]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
DoH: http_send_outgoing() return value is not used
authorArtem Boldariev <artem@boldariev.com>
Wed, 19 Feb 2025 10:28:37 +0000 (12:28 +0200)
committerArtem Boldariev <artem@boldariev.com>
Wed, 19 Feb 2025 15:52:36 +0000 (17:52 +0200)
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.

lib/isc/netmgr/http.c

index f18f972ff62ecf2c44a224648a48074f5491b6ce..39beec04873a98373f9eecaafcbef8184e2a72d8 100644 (file)
@@ -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 &&