Noticed when working on my next [more interesting] patch... Various functions could/should be static.
Ross Index: server_fcgi.c =================================================================== RCS file: /cvs/src/usr.sbin/httpd/server_fcgi.c,v retrieving revision 1.81 diff -u -p -r1.81 server_fcgi.c --- server_fcgi.c 9 Feb 2020 09:44:04 -0000 1.81 +++ server_fcgi.c 11 Jul 2020 11:18:07 -0000 @@ -76,13 +76,13 @@ struct server_fcgi_param { uint8_t buf[FCGI_RECORD_SIZE]; }; -int server_fcgi_header(struct client *, unsigned int); -void server_fcgi_read(struct bufferevent *, void *); -int server_fcgi_writeheader(struct client *, struct kv *, void *); -int server_fcgi_writechunk(struct client *); -int server_fcgi_getheaders(struct client *); -int fcgi_add_param(struct server_fcgi_param *, const char *, const char *, - struct client *); +static int server_fcgi_header(struct client *, unsigned int); +static void server_fcgi_read(struct bufferevent *, void *); +static int server_fcgi_writeheader(struct client *, struct kv *, void *); +static int server_fcgi_writechunk(struct client *); +static int server_fcgi_getheaders(struct client *); +static int fcgi_add_param(struct server_fcgi_param *, const char *, + const char *, struct client *); int server_fcgi(struct httpd *env, struct client *clt) @@ -453,7 +453,7 @@ fcgi_add_stdin(struct client *clt, struc return (0); } -int +static int fcgi_add_param(struct server_fcgi_param *p, const char *key, const char *val, struct client *clt) { @@ -509,7 +509,7 @@ fcgi_add_param(struct server_fcgi_param return (0); } -void +static void server_fcgi_read(struct bufferevent *bev, void *arg) { uint8_t buf[FCGI_RECORD_SIZE]; @@ -619,7 +619,7 @@ server_fcgi_read(struct bufferevent *bev } while (len > 0); } -int +static int server_fcgi_header(struct client *clt, unsigned int code) { struct server_config *srv_conf = clt->clt_srv_conf; @@ -699,7 +699,7 @@ server_fcgi_header(struct client *clt, u return (0); } -int +static int server_fcgi_writeheader(struct client *clt, struct kv *hdr, void *arg) { struct server_fcgi_param *param = arg; @@ -751,7 +751,7 @@ server_fcgi_writeheader(struct client *c return (ret); } -int +static int server_fcgi_writechunk(struct client *clt) { struct evbuffer *evb = clt->clt_srvevb; @@ -776,7 +776,7 @@ server_fcgi_writechunk(struct client *cl return (0); } -int +static int server_fcgi_getheaders(struct client *clt) { struct http_descriptor *resp = clt->clt_descresp;