]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
convert to zalloc
authorHolger Lubitz <hal@duncan.ol.sub.de>
Sun, 17 Jun 2007 23:24:46 +0000 (01:24 +0200)
committerHolger Lubitz <hal@duncan.ol.sub.de>
Fri, 6 Jul 2007 18:19:55 +0000 (20:19 +0200)
src/core/posix_io.c

index f4ae1c137d519bf18390e48ad1eda99192026974..ca29ea697df3bea168d8898ebcdc335410f85819 100644 (file)
@@ -215,10 +215,9 @@ int open ( const char *uri_string ) {
                return fd;
 
        /* Allocate and initialise structure */
-       file = malloc ( sizeof ( *file ) );
+       file = zalloc ( sizeof ( *file ) );
        if ( ! file )
                return -ENOMEM;
-       memset ( file, 0, sizeof ( *file ) );
        file->refcnt.free = posix_file_free;
        file->fd = fd;
        file->rc = -EINPROGRESS;