Fix compiler warnings

Added missing checks for return values of various function calls. Fixed
binlogrouter strerror_r usage and wrong buffer sizes.
This commit is contained in:
Markus Mäkelä
2017-02-13 11:41:58 +02:00
parent eb1e163bdf
commit acd66b4eb3
7 changed files with 78 additions and 27 deletions

View File

@ -260,8 +260,14 @@ static const char* admin_remove_user(USERS *users, const char* fname,
/** one step back */
MXS_ERROR("Unable to set stream position. ");
}
fgets(line, LINELEN, fp);
fputs(line, fp_tmp);
if (fgets(line, LINELEN, fp))
{
fputs(line, fp_tmp);
}
else
{
MXS_ERROR("Failed to read line from admin users file");
}
}
if (fgetpos(fp, &rpos) != 0)