Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
68add6e814
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/drivers/net/3c509.c

+ 1
- 2
src/drivers/net/3c509.c View File

347
 	for ( tag = 1 ; tag <= t509_max_tag ; tag++ ) {
347
 	for ( tag = 1 ; tag <= t509_max_tag ; tag++ ) {
348
 		/* Allocate struct t509_device */
348
 		/* Allocate struct t509_device */
349
 		if ( ! t509 )
349
 		if ( ! t509 )
350
-			t509 = malloc ( sizeof ( *t509 ) );
350
+			t509 = zalloc ( sizeof ( *t509 ) );
351
 		if ( ! t509 ) {
351
 		if ( ! t509 ) {
352
 			rc = -ENOMEM;
352
 			rc = -ENOMEM;
353
 			goto err;
353
 			goto err;
354
 		}
354
 		}
355
-		memset ( t509, 0, sizeof ( *t509 ) );
356
 		t509->tag = tag;
355
 		t509->tag = tag;
357
 
356
 
358
 		/* Send the ID sequence */
357
 		/* Send the ID sequence */

Loading…
Cancel
Save