Bläddra i källkod

convert to zalloc

tags/v0.9.3
Holger Lubitz 18 år sedan
förälder
incheckning
5ce16b03a1
1 ändrade filer med 1 tillägg och 2 borttagningar
  1. 1
    2
      src/drivers/bus/pci.c

+ 1
- 2
src/drivers/bus/pci.c Visa fil

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
 			

Laddar…
Avbryt
Spara