summaryrefslogtreecommitdiffstats
path: root/lib/lz4.c
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2020-11-09 16:44:26 (GMT)
committerYann Collet <cyan@fb.com>2020-11-09 16:44:26 (GMT)
commita29683980264b046797e207c6e995cae0a12b0a8 (patch)
tree9dbf11978bb7518245ac343c33653c9b71e6a94b /lib/lz4.c
parentadc46ea4c176380fb104273f66f1e618713a2481 (diff)
downloadlz4-a29683980264b046797e207c6e995cae0a12b0a8.zip
lz4-a29683980264b046797e207c6e995cae0a12b0a8.tar.gz
lz4-a29683980264b046797e207c6e995cae0a12b0a8.tar.bz2
changed LZ4_calloc() to a 2-arguments signature
to remain similar to stdlib's calloc(). Updated test to use c++ compiler for stricter signature check.
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 128e7b2..5fe3433 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -193,10 +193,10 @@
* Below functions must exist somewhere in the Project
* and be available at link time */
void* LZ4_malloc(size_t s);
-void* LZ4_calloc(size_t s);
+void* LZ4_calloc(size_t n, size_t s);
void LZ4_free(void* p);
# define ALLOC(s) LZ4_malloc(s)
-# define ALLOC_AND_ZERO(s) LZ4_calloc(s)
+# define ALLOC_AND_ZERO(s) LZ4_calloc(1,s)
# define FREEMEM(p) LZ4_free(p)
#else
# include <stdlib.h> /* malloc, calloc, free */