Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
c7549bcebe
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/arch/i386/drivers/net/undirom.c

+ 1
- 2
src/arch/i386/drivers/net/undirom.c View File

132
 	rom_len = ( romheader.ROMLength * 512 );
132
 	rom_len = ( romheader.ROMLength * 512 );
133
 
133
 
134
 	/* Allocate memory for UNDI ROM */
134
 	/* Allocate memory for UNDI ROM */
135
-	undirom = malloc ( sizeof ( *undirom ) );
135
+	undirom = zalloc ( sizeof ( *undirom ) );
136
 	if ( ! undirom ) {
136
 	if ( ! undirom ) {
137
 		DBG ( "Could not allocate UNDI ROM structure\n" );
137
 		DBG ( "Could not allocate UNDI ROM structure\n" );
138
 		rc = -ENOMEM;
138
 		rc = -ENOMEM;
139
 		goto err;
139
 		goto err;
140
 	}
140
 	}
141
-	memset ( undirom, 0, sizeof ( *undirom ) );
142
 	DBGC ( undirom, "UNDIROM %p trying expansion ROM at %04x:0000 "
141
 	DBGC ( undirom, "UNDIROM %p trying expansion ROM at %04x:0000 "
143
 	       "(%zdkB)\n", undirom, rom_segment, ( rom_len / 1024 ) );
142
 	       "(%zdkB)\n", undirom, rom_segment, ( rom_len / 1024 ) );
144
 	undirom->rom_segment = rom_segment;
143
 	undirom->rom_segment = rom_segment;

Loading…
Cancel
Save