summaryrefslogtreecommitdiffstats
path: root/contrib/libs/zstd/lib/common/zstd_common.c
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2022-02-10 16:45:08 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:08 +0300
commit4e839db24a3bbc9f1c610c43d6faaaa99824dcca (patch)
tree506dac10f5df94fab310584ee51b24fc5a081c22 /contrib/libs/zstd/lib/common/zstd_common.c
parent2d37894b1b037cf24231090eda8589bbb44fb6fc (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/zstd/lib/common/zstd_common.c')
-rw-r--r--contrib/libs/zstd/lib/common/zstd_common.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/libs/zstd/lib/common/zstd_common.c b/contrib/libs/zstd/lib/common/zstd_common.c
index 3d7e35b309b..ef5ff1cbbdf 100644
--- a/contrib/libs/zstd/lib/common/zstd_common.c
+++ b/contrib/libs/zstd/lib/common/zstd_common.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) Yann Collet, Facebook, Inc.
+ * Copyright (c) Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
@@ -13,8 +13,8 @@
/*-*************************************
* Dependencies
***************************************/
-#define ZSTD_DEPS_NEED_MALLOC
-#include "zstd_deps.h" /* ZSTD_malloc, ZSTD_calloc, ZSTD_free, ZSTD_memset */
+#define ZSTD_DEPS_NEED_MALLOC
+#include "zstd_deps.h" /* ZSTD_malloc, ZSTD_calloc, ZSTD_free, ZSTD_memset */
#include "error_private.h"
#include "zstd_internal.h"
@@ -53,31 +53,31 @@ const char* ZSTD_getErrorString(ZSTD_ErrorCode code) { return ERR_getErrorString
/*=**************************************************************
* Custom allocator
****************************************************************/
-void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem)
+void* ZSTD_customMalloc(size_t size, ZSTD_customMem customMem)
{
if (customMem.customAlloc)
return customMem.customAlloc(customMem.opaque, size);
- return ZSTD_malloc(size);
+ return ZSTD_malloc(size);
}
-void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem)
+void* ZSTD_customCalloc(size_t size, ZSTD_customMem customMem)
{
if (customMem.customAlloc) {
/* calloc implemented as malloc+memset;
* not as efficient as calloc, but next best guess for custom malloc */
void* const ptr = customMem.customAlloc(customMem.opaque, size);
- ZSTD_memset(ptr, 0, size);
+ ZSTD_memset(ptr, 0, size);
return ptr;
}
- return ZSTD_calloc(1, size);
+ return ZSTD_calloc(1, size);
}
-void ZSTD_customFree(void* ptr, ZSTD_customMem customMem)
+void ZSTD_customFree(void* ptr, ZSTD_customMem customMem)
{
if (ptr!=NULL) {
if (customMem.customFree)
customMem.customFree(customMem.opaque, ptr);
else
- ZSTD_free(ptr);
+ ZSTD_free(ptr);
}
}