]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[CLEANUP] Remove unneeded chars allocation
authorCyril Bonté <cyril.bonte@free.fr>
Mon, 1 Nov 2010 18:26:02 +0000 (19:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Nov 2010 08:26:28 +0000 (09:26 +0100)
Some arrays used to log addresses add some more bytes for ports but this space
is never used.

src/dumpstats.c
src/log.c
src/proto_http.c

index 735f83b200d0e916440f68089925f4eac8e70a9a..7745f8f35be1bf3879b09905f5920ff7159455e8 100644 (file)
@@ -2884,7 +2884,7 @@ int stats_dump_sess_to_buffer(struct session *s, struct buffer *rep)
 
                /* and start from where we stopped */
                while (s->data_ctx.sess.bref.ref != &sessions) {
-                       char pn[INET6_ADDRSTRLEN + strlen(":65535")];
+                       char pn[INET6_ADDRSTRLEN];
                        struct session *curr_sess;
 
                        curr_sess = LIST_ELEM(s->data_ctx.sess.bref.ref, struct session *, list);
index 9e269673e7aaa0f9f4c309af4b75de7ef6241cf3..d1387b5f7c995d9496f58b314eda6fec8f04b274 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -318,7 +318,7 @@ void send_log(struct proxy *p, int level, const char *message, ...)
  */
 void tcp_sess_log(struct session *s)
 {
-       char pn[INET6_ADDRSTRLEN + strlen(":65535")];
+       char pn[INET6_ADDRSTRLEN];
        struct proxy *fe = s->fe;
        struct proxy *be = s->be;
        struct proxy *prx_log;
index 4f0d48f94ebefc4401a3728dda7de36bcd723ab5..29d8f5135bc48f4b0ec1217fe17a109f2defa057 100644 (file)
@@ -846,7 +846,7 @@ struct pool_head *pool2_capture;
 
 void http_sess_clflog(struct session *s)
 {
-       char pn[INET6_ADDRSTRLEN + strlen(":65535")];
+       char pn[INET6_ADDRSTRLEN];
        struct proxy *fe = s->fe;
        struct proxy *be = s->be;
        struct proxy *prx_log;
@@ -1072,7 +1072,7 @@ trunc:
  */
 void http_sess_log(struct session *s)
 {
-       char pn[INET6_ADDRSTRLEN + strlen(":65535")];
+       char pn[INET6_ADDRSTRLEN];
        struct proxy *fe = s->fe;
        struct proxy *be = s->be;
        struct proxy *prx_log;