aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordmilideev <dmilideev@yandex-team.ru>2022-02-10 16:49:27 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:27 +0300
commit35f29a67a6b8e50e1826c837330086049114c5ba (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library
parent9795dc3ae7425582715fbeb9841992525a79ffd0 (diff)
downloadydb-35f29a67a6b8e50e1826c837330086049114c5ba.tar.gz
Restoring authorship annotation for <dmilideev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library')
-rw-r--r--library/cpp/binsaver/bin_saver.h6
-rw-r--r--library/cpp/binsaver/ut/binsaver_ut.cpp6
-rw-r--r--library/cpp/lfalloc/lf_allocX64.cpp20
-rw-r--r--library/cpp/lfalloc/lf_allocX64.h2
4 files changed, 17 insertions, 17 deletions
diff --git a/library/cpp/binsaver/bin_saver.h b/library/cpp/binsaver/bin_saver.h
index 1f5cdc1d9b..412424889f 100644
--- a/library/cpp/binsaver/bin_saver.h
+++ b/library/cpp/binsaver/bin_saver.h
@@ -313,11 +313,11 @@ public:
if (bRead) {
ui64 size = 0;
File.Read(&size, sizeof(size));
- TBuffer buffer;
- buffer.Advance(size);
+ TBuffer buffer;
+ buffer.Advance(size);
if (size > 0)
File.Read(buffer.Data(), buffer.Size());
- (*blob) = TBlob::FromBuffer(buffer);
+ (*blob) = TBlob::FromBuffer(buffer);
} else {
const ui64 size = blob->Size();
File.Write(&size, sizeof(size));
diff --git a/library/cpp/binsaver/ut/binsaver_ut.cpp b/library/cpp/binsaver/ut/binsaver_ut.cpp
index 2e63d748c4..37eba5406f 100644
--- a/library/cpp/binsaver/ut/binsaver_ut.cpp
+++ b/library/cpp/binsaver/ut/binsaver_ut.cpp
@@ -63,9 +63,9 @@ struct TTypeWithArray {
template <typename T, typename = std::enable_if_t<std::is_base_of<TCustomOuterSerializerTmpl, T>::value>>
int operator&(T& s, IBinSaver& f);
-static bool operator==(const TBlob& l, const TBlob& r) {
+static bool operator==(const TBlob& l, const TBlob& r) {
return TStringBuf(l.AsCharPtr(), l.Size()) == TStringBuf(r.AsCharPtr(), r.Size());
-}
+}
Y_UNIT_TEST_SUITE(BinSaver){
Y_UNIT_TEST(HasTrivialSerializer){
@@ -99,7 +99,7 @@ Y_UNIT_TEST(TestSets) {
TestBinSaverSerialization(THashSet<TString>{"A", "B", "C"});
TestBinSaverSerialization(TSet<TString>{"A", "B", "C"});
}
-
+
Y_UNIT_TEST(TestMaps) {
TestBinSaverSerialization(THashMap<TString, ui32>{{"A", 1}, {"B", 2}, {"C", 3}});
TestBinSaverSerialization(TMap<TString, ui32>{{"A", 1}, {"B", 2}, {"C", 3}});
diff --git a/library/cpp/lfalloc/lf_allocX64.cpp b/library/cpp/lfalloc/lf_allocX64.cpp
index faf41f2caf..2eb90761fe 100644
--- a/library/cpp/lfalloc/lf_allocX64.cpp
+++ b/library/cpp/lfalloc/lf_allocX64.cpp
@@ -57,23 +57,23 @@ extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size) {
return LFPosixMemalign(memptr, alignment, size);
}
-extern "C" void* memalign(size_t alignment, size_t size) {
- void* ptr;
+extern "C" void* memalign(size_t alignment, size_t size) {
+ void* ptr;
int res = LFPosixMemalign(&ptr, alignment, size);
return res ? nullptr : ptr;
-}
-
+}
+
extern "C" void* aligned_alloc(size_t alignment, size_t size) {
return memalign(alignment, size);
}
#if !defined(_MSC_VER) && !defined(_freebsd_)
-// Workaround for pthread_create bug in linux.
-extern "C" void* __libc_memalign(size_t alignment, size_t size) {
- return memalign(alignment, size);
-}
-#endif
-
+// Workaround for pthread_create bug in linux.
+extern "C" void* __libc_memalign(size_t alignment, size_t size) {
+ return memalign(alignment, size);
+}
+#endif
+
extern "C" void free(void* ptr) {
LFFree(ptr);
}
diff --git a/library/cpp/lfalloc/lf_allocX64.h b/library/cpp/lfalloc/lf_allocX64.h
index cf9ce6feab..fd2a906d6f 100644
--- a/library/cpp/lfalloc/lf_allocX64.h
+++ b/library/cpp/lfalloc/lf_allocX64.h
@@ -1917,7 +1917,7 @@ static Y_FORCE_INLINE void* LFVAlloc(size_t size) {
#else
size_t bigsize = (size + pg - 1) & (~(pg - 1));
p = LFAlloc(bigsize);
-#endif
+#endif
Y_ASSERT_NOBT((intptr_t)p % N_PAGE_SIZE == 0);
return p;