Fixes to minor Coverity errors:

75424
73422
72724
72702
72662
This commit is contained in:
Markus Makela
2014-11-07 11:12:26 +02:00
parent e1af60ac71
commit 474f018cee
4 changed files with 13 additions and 5 deletions

View File

@ -1268,7 +1268,7 @@ SERVER *server;
(PERCENT_TYPE|COUNT_TYPE));
}
if (!succp)
if (!succp && param != NULL)
{
LOGIF(LM, (skygw_log_write(
LOGFILE_MESSAGE,
@ -1362,7 +1362,7 @@ SERVER *server;
if (enable_root_user && service)
serviceEnableRootUser(service, atoi(enable_root_user));
if (allow_localhost_match_wildcard_host)
if (allow_localhost_match_wildcard_host && service)
serviceEnableLocalhostMatchWildcardHost(
service,
atoi(allow_localhost_match_wildcard_host));

View File

@ -1479,7 +1479,11 @@ int main(int argc, char **argv)
bool succp;
sprintf(buf, "%s/log", home_dir);
mkdir(buf, 0777);
if(mkdir(buf, 0777) != 0){
fprintf(stderr,
"Error: Cannot create log directory: %s\n",buf);
goto return_main;
}
argv[0] = "MaxScale";
argv[1] = "-j";
argv[2] = buf;