Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
f77d9469a4
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/core/posix_io.c

+ 1
- 2
src/core/posix_io.c View File

215
 		return fd;
215
 		return fd;
216
 
216
 
217
 	/* Allocate and initialise structure */
217
 	/* Allocate and initialise structure */
218
-	file = malloc ( sizeof ( *file ) );
218
+	file = zalloc ( sizeof ( *file ) );
219
 	if ( ! file )
219
 	if ( ! file )
220
 		return -ENOMEM;
220
 		return -ENOMEM;
221
-	memset ( file, 0, sizeof ( *file ) );
222
 	file->refcnt.free = posix_file_free;
221
 	file->refcnt.free = posix_file_free;
223
 	file->fd = fd;
222
 	file->fd = fd;
224
 	file->rc = -EINPROGRESS;
223
 	file->rc = -EINPROGRESS;

Loading…
Cancel
Save