From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id DE5F7B6B3 for ; Thu, 19 Feb 2015 15:53:59 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 19 Feb 2015 06:53:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,609,1418112000"; d="scan'208";a="668635467" Received: from bricha3-mobl3.ger.corp.intel.com ([10.243.20.37]) by fmsmga001.fm.intel.com with SMTP; 19 Feb 2015 06:53:56 -0800 Received: by (sSMTP sendmail emulation); Thu, 19 Feb 2015 14:53:55 +0025 Date: Thu, 19 Feb 2015 14:53:54 +0000 From: Bruce Richardson To: Stephen Hemminger Message-ID: <20150219145354.GB700@bricha3-MOBL3> References: <1423925950-5201-1-git-send-email-shemming@brocade.com> <1423925950-5201-2-git-send-email-shemming@brocade.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423925950-5201-2-git-send-email-shemming@brocade.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org, Stephen Hemminger Subject: Re: [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: Thu, 19 Feb 2015 14:54:00 -0000 On Sat, Feb 14, 2015 at 09:59:06AM -0500, Stephen Hemminger wrote: > Don't need to cast malloc family of functions since they return > void *. > > Signed-off-by: Stephen Hemminger Acked-by: Bruce Richardson > --- > 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 >