diff --git a/query_classifier/test/canonical_tests/canonizer.c b/query_classifier/test/canonical_tests/canonizer.c index 7983c9041..d44478399 100644 --- a/query_classifier/test/canonical_tests/canonizer.c +++ b/query_classifier/test/canonical_tests/canonizer.c @@ -57,7 +57,7 @@ int main(int argc, char** argv) { fgets(readbuff,4092,infile); psize = strlen(readbuff); - if(psize < 0 || psize > 4092){ + if(psize > 4092){ continue; } qbuff = gwbuf_alloc(psize + 7); diff --git a/server/core/config.c b/server/core/config.c index b0aa25178..153bf1640 100644 --- a/server/core/config.c +++ b/server/core/config.c @@ -1393,11 +1393,11 @@ SERVER *server; user, auth); 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( - service, + obj->element, atoi(allow_localhost_match_wildcard_host)); } }