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

@@ -166,8 +166,7 @@ ps1snd_get_buffer(int32_t *buffer, int len, void *priv)
static void *
ps1snd_init(UNUSED(const device_t *info))
{
ps1snd_t *ps1snd = malloc(sizeof(ps1snd_t));
memset(ps1snd, 0x00, sizeof(ps1snd_t));
ps1snd_t *ps1snd = calloc(1, sizeof(ps1snd_t));
sn76489_init(&ps1snd->sn76489, 0x0205, 0x0001, SN76496, 4000000);