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

@@ -1080,8 +1080,7 @@ threec501_nic_init(UNUSED(const device_t *info))
uint32_t mac;
threec501_t *dev;
dev = malloc(sizeof(threec501_t));
memset(dev, 0x00, sizeof(threec501_t));
dev = calloc(1, sizeof(threec501_t));
dev->maclocal[0] = 0x02; /* 02:60:8C (3Com OID) */
dev->maclocal[1] = 0x60;
dev->maclocal[2] = 0x8C;