malloc to calloc
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user