From: William Lallemand Date: Thu, 2 Apr 2020 16:11:47 +0000 (+0200) Subject: BUG/MINOR: ssl/cli: fix spaces in 'show ssl crt-list' X-Git-Tag: v2.2-dev6~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58a522227ba3697e5701e0e7c51683dc00bcc811;p=thirdparty%2Fhaproxy.git BUG/MINOR: ssl/cli: fix spaces in 'show ssl crt-list' Fix a inconsistency in the spaces which were not printed everywhere if there was no SSL options but some filters. --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index bf6205fb29..37a45214cc 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -11077,7 +11077,7 @@ static void dump_crtlist_sslconf(struct buffer *buf, const struct ssl_bind_conf space++; } - chunk_appendf(buf, "] "); + chunk_appendf(buf, "]"); return; } @@ -11085,17 +11085,13 @@ static void dump_crtlist_sslconf(struct buffer *buf, const struct ssl_bind_conf /* dump a list of filters */ static void dump_crtlist_filters(struct buffer *buf, struct crtlist_entry *entry) { - int space = 0; int i; if (!entry->fcount) return; for (i = 0; i < entry->fcount; i++) { - if (space) - chunk_appendf(buf, " "); - chunk_appendf(buf, "%s", entry->filters[i]); - space = 1; + chunk_appendf(buf, " %s", entry->filters[i]); } return; }