aboutsummaryrefslogtreecommitdiffstats
path: root/util/stream
diff options
context:
space:
mode:
authorkulikov <kulikov@yandex-team.ru>2022-02-10 16:49:34 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:34 +0300
commit65e5266709e7ff94b14ae128309e229de714b0df (patch)
treed4901f06e56d95f5e5d36bd1806bcc144d03bf41 /util/stream
parent0041d99876ae3dccc3f0fa8787131d85ddfd486b (diff)
downloadydb-65e5266709e7ff94b14ae128309e229de714b0df.tar.gz
Restoring authorship annotation for <kulikov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/stream')
-rw-r--r--util/stream/buffered.cpp6
-rw-r--r--util/stream/ios_ut.cpp16
-rw-r--r--util/stream/tokenizer.h6
-rw-r--r--util/stream/zerocopy.cpp8
4 files changed, 18 insertions, 18 deletions
diff --git a/util/stream/buffered.cpp b/util/stream/buffered.cpp
index a00e592e1c..6c8519bdfe 100644
--- a/util/stream/buffered.cpp
+++ b/util/stream/buffered.cpp
@@ -71,13 +71,13 @@ public:
while (true) {
if (MemInput_.Exhausted()) {
- const size_t bytesRead = Slave_->Read(Buf(), BufLen());
+ const size_t bytesRead = Slave_->Read(Buf(), BufLen());
- if (!bytesRead) {
+ if (!bytesRead) {
break;
}
- MemInput_.Reset(Buf(), bytesRead);
+ MemInput_.Reset(Buf(), bytesRead);
}
const size_t a_len(MemInput_.Avail());
diff --git a/util/stream/ios_ut.cpp b/util/stream/ios_ut.cpp
index 139f4296e5..9db05b9fba 100644
--- a/util/stream/ios_ut.cpp
+++ b/util/stream/ios_ut.cpp
@@ -261,21 +261,21 @@ void TStreamsTest::TestBufferStream() {
stream.Write(s.data(), s.size());
char buf[5];
- size_t bytesRead = stream.Read(buf, 4);
- UNIT_ASSERT_EQUAL(4, bytesRead);
+ size_t bytesRead = stream.Read(buf, 4);
+ UNIT_ASSERT_EQUAL(4, bytesRead);
UNIT_ASSERT_EQUAL(0, strncmp(s.data(), buf, 4));
stream.Write(s.data(), s.size());
- bytesRead = stream.Read(buf, 2);
- UNIT_ASSERT_EQUAL(2, bytesRead);
+ bytesRead = stream.Read(buf, 2);
+ UNIT_ASSERT_EQUAL(2, bytesRead);
UNIT_ASSERT_EQUAL(0, strncmp("te", buf, 2));
- bytesRead = stream.Read(buf, 2);
- UNIT_ASSERT_EQUAL(2, bytesRead);
+ bytesRead = stream.Read(buf, 2);
+ UNIT_ASSERT_EQUAL(2, bytesRead);
UNIT_ASSERT_EQUAL(0, strncmp("st", buf, 2));
- bytesRead = stream.Read(buf, 2);
- UNIT_ASSERT_EQUAL(0, bytesRead);
+ bytesRead = stream.Read(buf, 2);
+ UNIT_ASSERT_EQUAL(0, bytesRead);
}
namespace {
diff --git a/util/stream/tokenizer.h b/util/stream/tokenizer.h
index b2398efdd1..41f5f2a76d 100644
--- a/util/stream/tokenizer.h
+++ b/util/stream/tokenizer.h
@@ -173,11 +173,11 @@ public:
private:
inline size_t Fill() {
const size_t avail = BufEnd() - End_;
- const size_t bytesRead = Input_->Read(End_, avail);
+ const size_t bytesRead = Input_->Read(End_, avail);
- End_ += bytesRead;
+ End_ += bytesRead;
- return bytesRead;
+ return bytesRead;
}
inline char* BufBegin() noexcept {
diff --git a/util/stream/zerocopy.cpp b/util/stream/zerocopy.cpp
index dc2982ad55..be27642733 100644
--- a/util/stream/zerocopy.cpp
+++ b/util/stream/zerocopy.cpp
@@ -44,12 +44,12 @@ size_t IZeroCopyInputFastReadTo::DoReadTo(TString& st, char ch) {
st.clear();
do {
if (const char* pos = (const char*)memchr(ptr, ch, len)) {
- size_t bytesRead = (pos - ptr) + 1;
- if (bytesRead > 1) {
+ size_t bytesRead = (pos - ptr) + 1;
+ if (bytesRead > 1) {
st.append(ptr, pos);
}
- Undo(len - bytesRead);
- result += bytesRead;
+ Undo(len - bytesRead);
+ result += bytesRead;
return result;
} else {
result += len;