From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ig0-f179.google.com (mail-ig0-f179.google.com [209.85.213.179]) by dpdk.org (Postfix) with ESMTP id 020FCB4BD for ; Sat, 14 Feb 2015 15:59:29 +0100 (CET) Received: by mail-ig0-f179.google.com with SMTP id l13so16143055iga.0 for ; Sat, 14 Feb 2015 06:59:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bZa4aaVeaU6XWYC0yJTjhVxD64QEiYlTTOormpegLLw=; b=QcOMmgVO2JoCyCqiUyPc3G6ac+lXqVmZDW2H/ebUBnMOXFuGCHIN1mRg+r4zzaVRwE aI8mlYB+8cMeMaPlgLG+tx4AdQwXVV3jNcCjhv58MXcHKarIBTxb2gD0MBZmEWwusW3i 72RP/Qd9r9gerub02Se+fsS8fzHCkKCgouAAfVgj7pkZi/otkEzVkXs+UzR1rf32ifyg HqmT3FgvRvr/ATH12XWYQflJd3dO720rrA6lHh82soZPmTP4O7PQ5i80sEx8SfsBsf7h C1RcSgQ5DbuXRCQJEuBl7lik1h/NSq0u8pzj2/skCRJpimKs/vO7B5lDklJLQHXr/g1z Nn3g== X-Gm-Message-State: ALoCoQnAmYBL/wxN5oY8Dvb9eMTRZtbivHbskbrVwM5JocLDRxlY/9L09v8dXh3pspO/264Rv05f X-Received: by 10.42.112.199 with SMTP id z7mr777161icp.46.1423925968450; Sat, 14 Feb 2015 06:59:28 -0800 (PST) Received: from uryu.home.lan ([67.210.173.2]) by mx.google.com with ESMTPSA id a125sm6302383ioa.40.2015.02.14.06.59.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Feb 2015 06:59:27 -0800 (PST) From: Stephen Hemminger X-Google-Original-From: Stephen Hemminger To: dev@dpdk.org Date: Sat, 14 Feb 2015 09:59:06 -0500 Message-Id: <1423925950-5201-2-git-send-email-shemming@brocade.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1423925950-5201-1-git-send-email-shemming@brocade.com> References: <1423925950-5201-1-git-send-email-shemming@brocade.com> Cc: Stephen Hemminger Subject: [dpdk-dev] [PATCH 2/6] vhost_xen: remove unnecessary cast X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 14:59:29 -0000 Don't need to cast malloc family of functions since they return void *. Signed-off-by: Stephen Hemminger --- examples/vhost_xen/vhost_monitor.c | 2 +- examples/vhost_xen/xenstore_parse.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/vhost_xen/vhost_monitor.c b/examples/vhost_xen/vhost_monitor.c index f683989..9d99962 100644 --- a/examples/vhost_xen/vhost_monitor.c +++ b/examples/vhost_xen/vhost_monitor.c @@ -138,7 +138,7 @@ add_xen_guest(int32_t dom_id) if ((guest = get_xen_guest(dom_id)) != NULL) return guest; - guest = (struct xen_guest * )calloc(1, sizeof(struct xen_guest)); + guest = calloc(1, sizeof(struct xen_guest)); if (guest) { RTE_LOG(ERR, XENHOST, " %s: return newly created guest with %d rings\n", __func__, guest->vring_num); TAILQ_INSERT_TAIL(&guest_root, guest, next); diff --git a/examples/vhost_xen/xenstore_parse.c b/examples/vhost_xen/xenstore_parse.c index 9441639..df191ac 100644 --- a/examples/vhost_xen/xenstore_parse.c +++ b/examples/vhost_xen/xenstore_parse.c @@ -248,8 +248,8 @@ parse_gntnode(int dom_id, char *path) goto err; } - gntnode = (struct xen_gntnode *)calloc(1, sizeof(struct xen_gntnode)); - gnt = (struct xen_gnt *)calloc(gref_num, sizeof(struct xen_gnt)); + gntnode = calloc(1, sizeof(struct xen_gntnode)); + gnt = calloc(gref_num, sizeof(struct xen_gnt)); if (gnt == NULL || gntnode == NULL) goto err; -- 2.1.4