This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] use talloc_zero instead of talloc + memset

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] use talloc_zero instead of talloc + memset
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 Jan 2006 15:22:08 +0000
Delivery-date: Tue, 24 Jan 2006 15:31:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User vhanquez@xxxxxxxxxxxxxxxxxxxxxxx
# Node ID 6afcef05125750af0e756bdcce226461aefd83c7
# Parent  c70109e64c9e6d7f73c82e45047cecde783e76a5
use talloc_zero instead of talloc + memset

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r c70109e64c9e -r 6afcef051257 tools/xenstore/xenstored_core.c
--- a/tools/xenstore/xenstored_core.c   Tue Jan 24 11:50:38 2006
+++ b/tools/xenstore/xenstored_core.c   Tue Jan 24 12:03:06 2006
@@ -1301,11 +1301,10 @@
        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;

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] use talloc_zero instead of talloc + memset, Xen patchbot -unstable <=