Selaa lähdekoodia

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 vuotta sitten
vanhempi
commit
a4bea78974
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1
    2
      src/drivers/bus/eisa.c

+ 1
- 2
src/drivers/bus/eisa.c Näytä tiedosto

106
 	for ( slot = EISA_MIN_SLOT ; slot <= EISA_MAX_SLOT ; slot++ ) {
106
 	for ( slot = EISA_MIN_SLOT ; slot <= EISA_MAX_SLOT ; slot++ ) {
107
 		/* Allocate struct eisa_device */
107
 		/* Allocate struct eisa_device */
108
 		if ( ! eisa )
108
 		if ( ! eisa )
109
-			eisa = malloc ( sizeof ( *eisa ) );
109
+			eisa = zalloc ( sizeof ( *eisa ) );
110
 		if ( ! eisa ) {
110
 		if ( ! eisa ) {
111
 			rc = -ENOMEM;
111
 			rc = -ENOMEM;
112
 			goto err;
112
 			goto err;
113
 		}
113
 		}
114
-		memset ( eisa, 0, sizeof ( *eisa ) );
115
 		eisa->slot = slot;
114
 		eisa->slot = slot;
116
 		eisa->ioaddr = EISA_SLOT_BASE ( eisa->slot );
115
 		eisa->ioaddr = EISA_SLOT_BASE ( eisa->slot );
117
 
116
 

Loading…
Peruuta
Tallenna