use talloc_zero instead of talloc + memset
authorvhanquez@kneesa.uk.xensource.com <vhanquez@kneesa.uk.xensource.com>
Tue, 24 Jan 2006 12:03:06 +0000 (12:03 +0000)
committervhanquez@kneesa.uk.xensource.com <vhanquez@kneesa.uk.xensource.com>
Tue, 24 Jan 2006 12:03:06 +0000 (12:03 +0000)
Signed-off-by: Vincent Hanquez <vincent@xensource.com>
tools/xenstore/xenstored_core.c

index b55731fe16b88e85d90dfdc1b657b5b3a7f1a643..82080ee70e90f72bf7979687abd19de8bd7a2c7e 100644 (file)
@@ -1301,11 +1301,10 @@ struct connection *new_connection(connwritefn_t *write, connreadfn_t *read)
 {
        struct connection *new;
 
-       new = talloc(talloc_autofree_context(), struct connection);
+       new = talloc_zero(talloc_autofree_context(), struct connection);
        if (!new)
                return NULL;
 
-       memset(new, 0, sizeof(*new));
        new->fd = -1;
        new->write = write;
        new->read = read;