Used sizeof operator for calculating the length of a string.

This commit is contained in:
vraatikka
2013-10-24 10:51:54 +03:00
parent ddab34fe72
commit 241a0a6175

View File

@ -296,7 +296,7 @@ static bool create_parse_tree(
/** Set some database to thd so that parsing won't fail because of /** Set some database to thd so that parsing won't fail because of
* missing database. Then parse. */ * missing database. Then parse. */
failp = thd->set_db(virtual_db, sizeof(virtual_db)); failp = thd->set_db(virtual_db, strlen(virtual_db));
if (failp) { if (failp) {
fprintf(stderr, "Setting database for thd failed\n"); fprintf(stderr, "Setting database for thd failed\n");