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

@@ -128,8 +128,7 @@ mtouch_initnvr(void *priv)
FILE *fp;
/* Allocate and initialize the EEPROM. */
dev->nvr = (uint8_t *) malloc(NVR_SIZE);
memset(dev->nvr, 0x00, NVR_SIZE);
dev->nvr = (uint8_t *) calloc(1, NVR_SIZE);
fp = nvr_fopen(dev->nvr_path, "rb");
if (fp) {