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

@@ -491,8 +491,7 @@ pci_bridge_init(const device_t *info)
uint8_t interrupt_mask;
uint8_t slot_count;
pci_bridge_t *dev = (pci_bridge_t *) malloc(sizeof(pci_bridge_t));
memset(dev, 0, sizeof(pci_bridge_t));
pci_bridge_t *dev = (pci_bridge_t *) calloc(1, sizeof(pci_bridge_t));
dev->local = info->local;
dev->bus_index = pci_register_bus();