From 628a446c6679ec47f2ed428132911ba96dc02ade Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Sat, 27 Dec 2014 01:06:19 +0000 Subject: [PATCH] Output strerror from xo_warn Reported by: bapt Reviewed by: bapt, ngie Differential Revision: https://reviews.freebsd.org/D1378 --- contrib/libxo/libxo/libxo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/libxo/libxo/libxo.c b/contrib/libxo/libxo/libxo.c index 89adc03fe2f5..2c9733773378 100644 --- a/contrib/libxo/libxo/libxo.c +++ b/contrib/libxo/libxo/libxo.c @@ -956,9 +956,6 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_warn, } memcpy(newfmt + plen, fmt, len); - /* Add a newline to the fmt string */ - if (!(xop->xo_flags & XOF_WARN_XML)) - newfmt[len++ + plen] = '\n'; newfmt[len + plen] = '\0'; if (xop->xo_flags & XOF_WARN_XML) { @@ -1010,6 +1007,7 @@ xo_warn_hcv (xo_handle_t *xop, int code, int check_warn, } else { vfprintf(stderr, newfmt, vap); + fprintf(stderr, ": %s\n", strerror(code)); } }