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

@ -746,9 +746,8 @@ hashtable_save(HASHTABLE *table, const char *filename,
}
if (write(fd, &rval, sizeof(rval)) == -1) // Write zero counter, will be overrwriten at end
{
char err[MXS_STRERROR_BUFLEN];
MXS_ERROR("Failed to write hashtable item count: %d, %s", errno,
strerror_r(errno, err, sizeof(err)));
mxs_strerror(errno));
}
if ((iter = hashtable_iterator(table)) != NULL)
{
@ -776,9 +775,8 @@ hashtable_save(HASHTABLE *table, const char *filename,
{
if (write(fd, &rval, sizeof(rval)) == -1)
{
char err[MXS_STRERROR_BUFLEN];
MXS_ERROR("Failed to write hashtable item count: %d, %s", errno,
strerror_r(errno, err, sizeof(err)));
mxs_strerror(errno));
}
}