Replace strerror_r with mxs_strerror

The mxs_strerror function requires no local buffer, thus making it simpler
and cleaner to use.
This commit is contained in:
Markus Mäkelä
2017-03-07 12:18:53 +02:00
parent d7e48f93bb
commit e1a1959bc2
33 changed files with 174 additions and 337 deletions

View File

@ -176,9 +176,8 @@ bool runtime_destroy_server(SERVER *server)
{
if (errno != ENOENT)
{
char err[MXS_STRERROR_BUFLEN];
MXS_ERROR("Failed to remove persisted server configuration '%s': %d, %s",
filename, errno, strerror_r(errno, err, sizeof(err)));
filename, errno, mxs_strerror(errno));
}
else
{
@ -542,9 +541,8 @@ bool runtime_destroy_listener(SERVICE *service, const char *name)
{
if (errno != ENOENT)
{
char err[MXS_STRERROR_BUFLEN];
MXS_ERROR("Failed to remove persisted listener configuration '%s': %d, %s",
filename, errno, strerror_r(errno, err, sizeof(err)));
filename, errno, mxs_strerror(errno));
}
else
{
@ -618,9 +616,8 @@ bool runtime_destroy_monitor(MXS_MONITOR *monitor)
{
if (errno != ENOENT)
{
char err[MXS_STRERROR_BUFLEN];
MXS_ERROR("Failed to remove persisted monitor configuration '%s': %d, %s",
filename, errno, strerror_r(errno, err, sizeof(err)));
filename, errno, mxs_strerror(errno));
}
else
{