commit 920fd1d65f7c4c0d97d686644c761b946f0d213e
parent 478f32c99081c72e2d4861ce8b9a23fd1757a218
Author: Remy Noulin <loader2x@gmail.com>
Date: Tue, 27 Sep 2022 15:50:22 +0200
fix new0Ptr macro
release/libsheepy.h | 2 +-
src/libsheepy.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/release/libsheepy.h b/release/libsheepy.h
@@ -3350,7 +3350,7 @@ void **iListDel(void ***list, int64_t start, int64_t end) MUST_CHECK;
// create name variable and calloc it on heap
#define new0Ptr(name, type)\
- ;type *name = calloc(sizeof(type))
+ ;type *name = calloc(1, sizeof(type))
// allocate struct on heap and assign address
#define allocAPtr(name) name = malloc(sizeof(*(name)))
diff --git a/src/libsheepy.h b/src/libsheepy.h
@@ -3350,7 +3350,7 @@ void **iListDel(void ***list, int64_t start, int64_t end) MUST_CHECK;
// create name variable and calloc it on heap
#define new0Ptr(name, type)\
- ;type *name = calloc(sizeof(type))
+ ;type *name = calloc(1, sizeof(type))
// allocate struct on heap and assign address
#define allocAPtr(name) name = malloc(sizeof(*(name)))