From 265e165d8203662c886cccc5c9d46ceb3b627275 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 12 Apr 2022 08:49:27 +0200 Subject: [PATCH] CLEANUP: conn-stream: Don't export internal functions cs_new() and cs_attach_app() are only used internally. Thus, there is no reason to export them. --- include/haproxy/conn_stream.h | 2 -- src/conn_stream.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index 7cf44ada4..ab2809d24 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -38,7 +38,6 @@ struct check; struct cs_endpoint *cs_endpoint_new(); void cs_endpoint_free(struct cs_endpoint *endp); -struct conn_stream *cs_new(struct cs_endpoint *endp); struct conn_stream *cs_new_from_mux(struct cs_endpoint *endp, struct session *sess, struct buffer *input); struct conn_stream *cs_new_from_applet(struct cs_endpoint *endp, struct session *sess, struct buffer *input); struct conn_stream *cs_new_from_strm(struct stream *strm, unsigned int flags); @@ -46,7 +45,6 @@ struct conn_stream *cs_new_from_check(struct check *check, unsigned int flags); void cs_free(struct conn_stream *cs); int cs_attach_mux(struct conn_stream *cs, void *target, void *ctx); -void cs_attach_applet(struct conn_stream *cs, void *target, void *ctx); int cs_attach_strm(struct conn_stream *cs, struct stream *strm); int cs_reset_endp(struct conn_stream *cs); diff --git a/src/conn_stream.c b/src/conn_stream.c index 2747e9756..38aaff293 100644 --- a/src/conn_stream.c +++ b/src/conn_stream.c @@ -109,7 +109,7 @@ void cs_endpoint_free(struct cs_endpoint *endp) /* Tries to allocate a new conn_stream and initialize its main fields. On * failure, nothing is allocated and NULL is returned. */ -struct conn_stream *cs_new(struct cs_endpoint *endp) +static struct conn_stream *cs_new(struct cs_endpoint *endp) { struct conn_stream *cs; @@ -251,7 +251,7 @@ int cs_attach_mux(struct conn_stream *cs, void *target, void *ctx) } /* Attaches a conn_stream to an applet endpoint and sets the endpoint ctx */ -void cs_attach_applet(struct conn_stream *cs, void *target, void *ctx) +static void cs_attach_applet(struct conn_stream *cs, void *target, void *ctx) { struct appctx *appctx = target;