malloc to calloc

This commit is contained in:
Jasmine Iwanek
2025-01-07 00:42:06 -05:00
parent f599e72114
commit 4e6f29a7d5
183 changed files with 245 additions and 493 deletions

View File

@@ -82,8 +82,7 @@ dac_get_buffer(int32_t *buffer, int len, void *priv)
static void *
dac_init(void *lpt)
{
lpt_dac_t *lpt_dac = malloc(sizeof(lpt_dac_t));
memset(lpt_dac, 0, sizeof(lpt_dac_t));
lpt_dac_t *lpt_dac = calloc(1, sizeof(lpt_dac_t));
lpt_dac->lpt = lpt;