[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/7] libxc: Removing dead code from xc_dom_allocate()
On 01/07/15 18:37, Jennifer Herbert wrote: > The only place that jumps to 'err:' does so because !dom, which is > rechecked in 'err:'. This patch simplifies, giving the same result. > > Signed-off-by: Jennifer Herbert <jennifer.herbert@xxxxxxxxxx> Coverity-ID: 1055188 ~Andrew > --- > tools/libxc/xc_dom_core.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c > index b100ce1..cde943c 100644 > --- a/tools/libxc/xc_dom_core.c > +++ b/tools/libxc/xc_dom_core.c > @@ -720,7 +720,7 @@ struct xc_dom_image *xc_dom_allocate(xc_interface *xch, > __FUNCTION__, cmdline, features); > dom = malloc(sizeof(*dom)); > if ( !dom ) > - goto err; > + return NULL; > > memset(dom, 0, sizeof(*dom)); > dom->xch = xch; > @@ -742,11 +742,6 @@ struct xc_dom_image *xc_dom_allocate(xc_interface *xch, > > dom->alloc_malloc += sizeof(*dom); > return dom; > - > - err: > - if ( dom ) > - xc_dom_release(dom); > - return NULL; > } > > int xc_dom_kernel_max_size(struct xc_dom_image *dom, size_t sz) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |