style. we use calloc

This commit is contained in:
iceman1001 committed 2024-01-07 20:47:07 +01:00
1 parent d906f23a0a
commit 482a6464a2
6 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
#include <stdlib.h>
RingBuffer *RingBuf_create(int capacity) {
RingBuffer *buffer = (RingBuffer *)malloc(sizeof(RingBuffer));
RingBuffer *buffer = (RingBuffer *)calloc(sizeof(RingBuffer), sizeof(uint8_t));
if (!buffer) {
return NULL;
}