diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index c03362d64..d7d9fe163 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -42,20 +42,6 @@ int cs_attach_app(struct conn_stream *cs, enum obj_type *app); void cs_detach_endp(struct conn_stream *cs); void cs_detach_app(struct conn_stream *cs); -/* - * Initializes all required fields for a new conn_strema. - */ -static inline void cs_init(struct conn_stream *cs) -{ - cs->obj_type = OBJ_TYPE_CS; - cs->flags = CS_FL_NONE; - cs->end = NULL; - cs->app = NULL; - cs->ctx = NULL; - cs->si = NULL; - cs->data_cb = NULL; -} - /* Returns the connection from a cs if the endpoint is a mux stream. Otherwise * NULL is returned. __cs_conn() returns the connection without any control * while cs_conn() check the endpoint type. diff --git a/src/conn_stream.c b/src/conn_stream.c index 01541a598..53b2992df 100644 --- a/src/conn_stream.c +++ b/src/conn_stream.c @@ -29,7 +29,15 @@ struct conn_stream *cs_new() cs = pool_alloc(pool_head_connstream); if (unlikely(!cs)) return NULL; - cs_init(cs); + + cs->obj_type = OBJ_TYPE_CS; + cs->flags = CS_FL_NONE; + cs->end = NULL; + cs->app = NULL; + cs->ctx = NULL; + cs->si = NULL; + cs->data_cb = NULL; + return cs; }