]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[MINOR] frontend: ensure debug message length is always initialized
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Sep 2011 09:21:06 +0000 (11:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Sep 2011 09:21:06 +0000 (11:21 +0200)
If the socket family ever changes from AF_INET*/AF_UNIX, we'd have a problem.

src/frontend.c

index a295729b21f32b40da47dc61bc6a144b31aabee0..4ed4862daea4a964069fc84acf62547cd5872df0 100644 (file)
@@ -178,7 +178,7 @@ int frontend_accept(struct session *s)
 
        if (unlikely((global.mode & MODE_DEBUG) && (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)))) {
                char pn[INET6_ADDRSTRLEN];
-               int len;
+               int len = 0;
 
                if (!(s->flags & SN_FRT_ADDR_SET))
                        get_frt_addr(s);