aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-04-23 14:58:37 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-04-23 15:14:31 +0300
commite378d50b00432742f25d9f84f19ff6d513a457d8 (patch)
tree8893be6b3514bc39971a15db1088c748f59454bf
parentf12862d32761cd6c9ba50446e9637f6d9b18ed43 (diff)
downloadydb-e378d50b00432742f25d9f84f19ff6d513a457d8.tar.gz
Intermediate changes
-rw-r--r--util/datetime/base_ut.cpp6
-rw-r--r--yt/python/yt/type_info/test/py2/ya.make4
2 files changed, 3 insertions, 7 deletions
diff --git a/util/datetime/base_ut.cpp b/util/datetime/base_ut.cpp
index 56b7496d19..5ada0794b7 100644
--- a/util/datetime/base_ut.cpp
+++ b/util/datetime/base_ut.cpp
@@ -33,14 +33,14 @@ struct TTestTime {
};
namespace {
- inline void OldDate8601(char* buf, time_t when) {
+ inline void OldDate8601(char* buf, size_t bufLen, time_t when) {
struct tm theTm;
struct tm* ret = nullptr;
ret = GmTimeR(&when, &theTm);
if (ret) {
- sprintf(buf, "%04d-%02d-%02dT%02d:%02d:%02dZ", theTm.tm_year + 1900, theTm.tm_mon + 1, theTm.tm_mday, theTm.tm_hour, theTm.tm_min, theTm.tm_sec);
+ snprintf(buf, bufLen, "%04d-%02d-%02dT%02d:%02d:%02dZ", theTm.tm_year + 1900, theTm.tm_mon + 1, theTm.tm_mday, theTm.tm_hour, theTm.tm_min, theTm.tm_sec);
} else {
*buf = '\0';
}
@@ -158,7 +158,7 @@ Y_UNIT_TEST_SUITE(TDateTimeTest) {
for (size_t i = 0; i < 1000000; ++i) {
const time_t t = RandomNumber<ui32>();
- OldDate8601(buf1, t);
+ OldDate8601(buf1, sizeof(buf1), t);
sprint_date8601(buf2, t);
UNIT_ASSERT_VALUES_EQUAL(TStringBuf(buf1), TStringBuf(buf2));
diff --git a/yt/python/yt/type_info/test/py2/ya.make b/yt/python/yt/type_info/test/py2/ya.make
index 0233403a73..99e4a631f2 100644
--- a/yt/python/yt/type_info/test/py2/ya.make
+++ b/yt/python/yt/type_info/test/py2/ya.make
@@ -1,7 +1,3 @@
PY2TEST()
-PEERDIR(
- yt/python/yt/type_info/test/lib
-)
-
END()