diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-01-31 17:59:10 +0300 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-02-09 19:16:40 +0300 |
commit | c88ff01faaf3dbc93564a15e930bb533a56516d1 (patch) | |
tree | 6172c63a181460fbcd40a7fbea97f3ed8f41bd39 /library/cpp/netliba/v6/udp_http.cpp | |
parent | 22faf7825187091e0ac85a196aab658c151f83be (diff) | |
download | ydb-c88ff01faaf3dbc93564a15e930bb533a56516d1.tar.gz |
Intermediate changes
Diffstat (limited to 'library/cpp/netliba/v6/udp_http.cpp')
-rw-r--r-- | library/cpp/netliba/v6/udp_http.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/netliba/v6/udp_http.cpp b/library/cpp/netliba/v6/udp_http.cpp index f318554a76..ab4ec52bf9 100644 --- a/library/cpp/netliba/v6/udp_http.cpp +++ b/library/cpp/netliba/v6/udp_http.cpp @@ -1041,9 +1041,9 @@ namespace NNetliba { char buf[1000]; TRequesterUserQueueSizes* qs = QueueSizes.Get(); - sprintf(buf, "\nRequest queue %d (%d bytes)\n", (int)AtomicGet(qs->ReqCount), (int)AtomicGet(qs->ReqQueueSize)); + snprintf(buf, sizeof(buf), "\nRequest queue %d (%d bytes)\n", (int)AtomicGet(qs->ReqCount), (int)AtomicGet(qs->ReqQueueSize)); res += buf; - sprintf(buf, "Response queue %d (%d bytes)\n", (int)AtomicGet(qs->RespCount), (int)AtomicGet(qs->RespQueueSize)); + snprintf(buf, sizeof(buf), "Response queue %d (%d bytes)\n", (int)AtomicGet(qs->RespCount), (int)AtomicGet(qs->RespQueueSize)); res += buf; const char* outReqStateNames[] = { @@ -1061,7 +1061,7 @@ namespace NNetliba { const TGUID& gg = i->first; const TOutRequestState& s = i->second; bool isSync = SyncRequests.find(gg) != SyncRequests.end(); - sprintf(buf, "%s\t%s %s TimePassed: %g %s\n", + snprintf(buf, sizeof(buf), "%s\t%s %s TimePassed: %g %s\n", GetAddressAsString(s.Address).c_str(), GetGuidAsString(gg).c_str(), outReqStateNames[s.State], s.TimePassed * 1000, isSync ? "isSync" : ""); @@ -1071,7 +1071,7 @@ namespace NNetliba { for (TInRequestHash::const_iterator i = InRequests.begin(); i != InRequests.end(); ++i) { const TGUID& gg = i->first; const TInRequestState& s = i->second; - sprintf(buf, "%s\t%s %s\n", + snprintf(buf, sizeof(buf), "%s\t%s %s\n", GetAddressAsString(s.Address).c_str(), GetGuidAsString(gg).c_str(), inReqStateNames[s.State]); res += buf; } |