aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/sys_alloc.h
diff options
context:
space:
mode:
authorspacelord <spacelord@yandex-team.ru>2022-02-10 16:48:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:15 +0300
commit16747e4f77455cca4932df21eb76f12cb0a97a5c (patch)
tree4dd6da4102d99d0d69dec53c1050d290a850a9f2 /util/system/sys_alloc.h
parenta817f5de12611ec73085eba17f8ec7740a46bdb7 (diff)
downloadydb-16747e4f77455cca4932df21eb76f12cb0a97a5c.tar.gz
Restoring authorship annotation for <spacelord@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/sys_alloc.h')
-rw-r--r--util/system/sys_alloc.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/util/system/sys_alloc.h b/util/system/sys_alloc.h
index 4221a28f8cc..3f2ea951163 100644
--- a/util/system/sys_alloc.h
+++ b/util/system/sys_alloc.h
@@ -19,20 +19,20 @@ inline void y_deallocate(void* p) {
free(p);
}
-/**
- * Behavior of realloc from C++99 to C++11 changed (http://www.cplusplus.com/reference/cstdlib/realloc/).
- *
- * Our implementation work as C++99: if new_sz == 0 free will be called on 'p' and nullptr returned.
- */
+/**
+ * Behavior of realloc from C++99 to C++11 changed (http://www.cplusplus.com/reference/cstdlib/realloc/).
+ *
+ * Our implementation work as C++99: if new_sz == 0 free will be called on 'p' and nullptr returned.
+ */
inline void* y_reallocate(void* p, size_t new_sz) {
- if (!new_sz) {
- if (p) {
- free(p);
- }
-
- return nullptr;
- }
-
+ if (!new_sz) {
+ if (p) {
+ free(p);
+ }
+
+ return nullptr;
+ }
+
void* r = realloc(p, new_sz);
if (r == nullptr) {