Fixes to Coverity erros 75748 and 76132.

This commit is contained in:
Markus Makela
2014-11-11 13:42:12 +02:00
parent 97934ed96a
commit 9cb2be9605
2 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ int main(int argc, char** argv)
{ {
fgets(readbuff,4092,infile); fgets(readbuff,4092,infile);
psize = strlen(readbuff); psize = strlen(readbuff);
if(psize < 0 || psize > 4092){ if(psize > 4092){
continue; continue;
} }
qbuff = gwbuf_alloc(psize + 7); qbuff = gwbuf_alloc(psize + 7);

View File

@ -1393,11 +1393,11 @@ SERVER *server;
user, user,
auth); auth);
if (enable_root_user) if (enable_root_user)
serviceEnableRootUser(service, atoi(enable_root_user)); serviceEnableRootUser(obj->element, atoi(enable_root_user));
if (allow_localhost_match_wildcard_host && service) if (allow_localhost_match_wildcard_host)
serviceEnableLocalhostMatchWildcardHost( serviceEnableLocalhostMatchWildcardHost(
service, obj->element,
atoi(allow_localhost_match_wildcard_host)); atoi(allow_localhost_match_wildcard_host));
} }
} }