[5.2] 80d4a27 Amazing that neither Coverity or FlexeLint complained about the syslog-ism "%m" being used in vsnprintf() via VSB.
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Fri Sep 15 11:17:30 UTC 2017
commit 80d4a276a20158b16a28d7e0d138f3bd98f74d72
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Sep 14 09:37:57 2017 +0000
Amazing that neither Coverity or FlexeLint complained about the
syslog-ism "%m" being used in vsnprintf() via VSB.
That said, it would have been damn convenient of %m was also usable
in *printf(3)...
diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index 4d23bba..f00e19a 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -622,7 +622,8 @@ Marg_connect(const struct vev *e, int what)
M_fd = VTCP_connected(M_fd);
if (M_fd < 0) {
- MGT_Complain(C_INFO, "Could not connect to CLI-master: %m");
+ MGT_Complain(C_INFO, "Could not connect to CLI-master: %s",
+ strerror(errno));
ma = VTAILQ_FIRST(&m_addr_list);
AN(ma);
VTAILQ_REMOVE(&m_addr_list, ma, list);
More information about the varnish-commit
mailing list