]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stream-int: rename si_reset() to si_init()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Jan 2022 07:13:46 +0000 (08:13 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Feb 2022 10:00:03 +0000 (11:00 +0100)
si_reset() function is only used when a stream-interface is allocated. Thus
rename it to si_init() insteaad.

include/haproxy/stream_interface.h
src/stream_interface.c

index a30f34526839a8d467f050c49e915853e43e2cf7..8119a423390c552fdb559c448f89d2fb38c0af1c 100644 (file)
@@ -94,11 +94,10 @@ static inline struct stream_interface *si_opposite(struct stream_interface *si)
        return ((si->flags & SI_FL_ISBACK) ? cs_strm(si->cs)->csf->si : cs_strm(si->cs)->csb->si);
 }
 
-/* initializes a stream interface in the SI_ST_INI state. It's detached from
- * any endpoint and only keeps its side which is expected to have already been
- * set.
+/* initializes a stream interface in the SI_ST_INI state and create the event
+ * tasklet.
  */
-static inline int si_reset(struct stream_interface *si)
+static inline int si_init(struct stream_interface *si)
 {
        si->src            = NULL;
        si->dst            = NULL;
index aa3b6d876d5c9fee217361ca45102b3950f9538b..ecbd7b06d3699398d24a346d2a9b66dd9e60ed9a 100644 (file)
@@ -111,7 +111,7 @@ struct stream_interface *si_new(struct conn_stream *cs)
        if (unlikely(!si))
                return NULL;
        si->flags = SI_FL_NONE;
-       if (si_reset(si) < 0) {
+       if (si_init(si) < 0) {
                pool_free(pool_head_streaminterface, si);
                return NULL;
        }