Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 18 years ago
parent
commit
7fa85d19b9
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/net/tcp/ftp.c

+ 1
- 2
src/net/tcp/ftp.c View File

426
 		return -EINVAL;
426
 		return -EINVAL;
427
 
427
 
428
 	/* Allocate and populate structure */
428
 	/* Allocate and populate structure */
429
-	ftp = malloc ( sizeof ( *ftp ) );
429
+	ftp = zalloc ( sizeof ( *ftp ) );
430
 	if ( ! ftp )
430
 	if ( ! ftp )
431
 		return -ENOMEM;
431
 		return -ENOMEM;
432
-	memset ( ftp, 0, sizeof ( *ftp ) );
433
 	ftp->refcnt.free = ftp_free;
432
 	ftp->refcnt.free = ftp_free;
434
 	xfer_init ( &ftp->xfer, &ftp_xfer_operations, &ftp->refcnt );
433
 	xfer_init ( &ftp->xfer, &ftp_xfer_operations, &ftp->refcnt );
435
 	ftp->uri = uri_get ( uri );
434
 	ftp->uri = uri_get ( uri );

Loading…
Cancel
Save