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

@@ -419,8 +419,7 @@ optimc_init(const device_t *info)
music_add_handler(sb_get_music_buffer_sbpro, optimc->sb);
sound_set_cd_audio_filter(sbpro_filter_cd_audio, optimc->sb); /* CD audio filter for the default context */
optimc->mpu = (mpu_t *) malloc(sizeof(mpu_t));
memset(optimc->mpu, 0, sizeof(mpu_t));
optimc->mpu = (mpu_t *) calloc(1, sizeof(mpu_t));
mpu401_init(optimc->mpu, optimc->cur_mpu401_addr, optimc->cur_mpu401_irq, M_UART, device_get_config_int("receive_input401"));
if (device_get_config_int("receive_input"))