From bfc34affaf5e80fe6a85bbcc4c302005154b4531 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 23 Oct 2014 19:04:57 +0100 Subject: [PATCH] udp: Print `&' in address descriptions only if multiple sockets Signed-off-by: Ian Jackson --- udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udp.c b/udp.c index 06acf33..70928a8 100644 --- a/udp.c +++ b/udp.c @@ -54,7 +54,7 @@ static const char *udp_addr_to_string(void *commst, const struct comm_addr *ca) assert(ix>=0 && ixn_socks); snprintf(sbuf, sizeof(sbuf), "udp:%s%s-%s", iaddr_to_string(&socks->socks[ix].addr), - ca->ix<0 ? "&" : "", + ca->ix<0 && socks->n_socks>1 ? "&" : "", iaddr_to_string(&ca->ia)); return sbuf; } -- 2.11.0