Output strerror from xo_warn

Reported by: bapt
Reviewed by: bapt, ngie

Differential Revision: https://reviews.freebsd.org/D1378
This commit is contained in:
Alfred Perlstein 2014-12-27 01:06:19 +00:00
parent 121f7af118
commit 628a446c66
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=276273

View File

@ -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));
}
}