Browse Source

convert to zalloc

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

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

90
 	for ( slot = 0 ; slot <= MCA_MAX_SLOT_NR ; slot++ ) {
90
 	for ( slot = 0 ; slot <= MCA_MAX_SLOT_NR ; slot++ ) {
91
 		/* Allocate struct mca_device */
91
 		/* Allocate struct mca_device */
92
 		if ( ! mca )
92
 		if ( ! mca )
93
-			mca = malloc ( sizeof ( *mca ) );
93
+			mca = zalloc ( sizeof ( *mca ) );
94
 		if ( ! mca ) {
94
 		if ( ! mca ) {
95
 			rc = -ENOMEM;
95
 			rc = -ENOMEM;
96
 			goto err;
96
 			goto err;
97
 		}
97
 		}
98
-		memset ( mca, 0, sizeof ( *mca ) );
99
 		mca->slot = slot;
98
 		mca->slot = slot;
100
 
99
 
101
 		/* Make sure motherboard setup is off */
100
 		/* Make sure motherboard setup is off */

Loading…
Cancel
Save