Neither clt_descreq nor clt_descresp in struct client need to be void *.
authorclaudio <claudio@openbsd.org>
Mon, 15 Aug 2022 12:29:17 +0000 (12:29 +0000)
committerclaudio <claudio@openbsd.org>
Mon, 15 Aug 2022 12:29:17 +0000 (12:29 +0000)
They both are only used as struct http_descriptor.
OK tb@

usr.sbin/httpd/httpd.h
usr.sbin/httpd/server_fcgi.c

index 50ee022..17fba2b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: httpd.h,v 1.160 2022/03/02 11:10:43 florian Exp $     */
+/*     $OpenBSD: httpd.h,v 1.161 2022/08/15 12:29:17 claudio Exp $     */
 
 /*
  * Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -332,8 +332,8 @@ struct client {
        struct bufferevent      *clt_bev;
        struct evbuffer         *clt_output;
        struct event             clt_ev;
-       void                    *clt_descreq;
-       void                    *clt_descresp;
+       struct http_descriptor  *clt_descreq;
+       struct http_descriptor  *clt_descresp;
        int                      clt_sndbufsiz;
        uint64_t                 clt_boundary;
 
index 2e5e647..073ab34 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: server_fcgi.c,v 1.94 2022/08/15 10:29:03 claudio Exp $        */
+/*     $OpenBSD: server_fcgi.c,v 1.95 2022/08/15 12:29:17 claudio Exp $        */
 
 /*
  * Copyright (c) 2014 Florian Obser <florian@openbsd.org>
@@ -581,8 +581,7 @@ server_fcgi_read(struct bufferevent *bev, void *arg)
                                }
                                /* Don't send content for HEAD requests */
                                if (clt->clt_fcgi.headerssent &&
-                                   ((struct http_descriptor *)
-                                   clt->clt_descreq)->http_method
+                                   clt->clt_descreq->http_method
                                    == HTTP_METHOD_HEAD)
                                        /* nothing */ ;
                                else if (server_fcgi_writechunk(clt) == -1) {