Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
5ce16b03a1
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/drivers/bus/pci.c

+ 1
- 2
src/drivers/bus/pci.c View File

245
 
245
 
246
 			/* Allocate struct pci_device */
246
 			/* Allocate struct pci_device */
247
 			if ( ! pci )
247
 			if ( ! pci )
248
-				pci = malloc ( sizeof ( *pci ) );
248
+				pci = zalloc ( sizeof ( *pci ) );
249
 			if ( ! pci ) {
249
 			if ( ! pci ) {
250
 				rc = -ENOMEM;
250
 				rc = -ENOMEM;
251
 				goto err;
251
 				goto err;
252
 			}
252
 			}
253
-			memset ( pci, 0, sizeof ( *pci ) );
254
 			pci->bus = bus;
253
 			pci->bus = bus;
255
 			pci->devfn = devfn;
254
 			pci->devfn = devfn;
256
 			
255
 			

Loading…
Cancel
Save