From f07df76c59ef72e8380d8b091eea31f9ea4a30c2 Mon Sep 17 00:00:00 2001 From: Yatsishin Ilya <2159081+qoega@users.noreply.github.com> Date: Thu, 24 Dec 2020 18:41:37 +0300 Subject: [PATCH] fix ans --- utils/db-generator/query_db_generator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/db-generator/query_db_generator.cpp b/utils/db-generator/query_db_generator.cpp index b6e287278ff..33b8e6ce8af 100644 --- a/utils/db-generator/query_db_generator.cpp +++ b/utils/db-generator/query_db_generator.cpp @@ -56,9 +56,9 @@ std::string randomDate() int32_t year = rng() % 136 + 1970; int32_t month = rng() % 12 + 1; int32_t day = rng() % 12 + 1; - char ans[13]; - sprintf(ans, "'%04u-%02u-%02u'", year, month, day); - return std::string(ans); + char answer[13]; + sprintf(answer, "'%04u-%02u-%02u'", year, month, day); + return std::string(answer); } std::string randomDatetime() @@ -69,9 +69,9 @@ std::string randomDatetime() int32_t hours = rng() % 24; int32_t minutes = rng() % 60; int32_t seconds = rng() % 60; - char ans[22]; + char answer[22]; sprintf( - ans, + answer, "'%04u-%02u-%02u %02u:%02u:%02u'", year, month, @@ -79,7 +79,7 @@ std::string randomDatetime() hours, minutes, seconds); - return std::string(ans); + return std::string(answer); } TableAndColumn get_table_a_column(const std::string & c) {