1 message in com.xensource.lists.xen-devel[Xen-devel] [PATCH] Drop useless if() ?
FromSent OnAttachments
Tony Breeds27 Nov 2005 20:18 
Subject:[Xen-devel] [PATCH] Drop useless if() ?
From:Tony Breeds (to@bakeyournoodle.com)
Date:11/27/2005 08:18:03 PM
List:com.xensource.lists.xen-devel

Hello All,

I noticed the following in xen/common/domain.c in boot_vcpu()

... if ( (rc = arch_set_info_guest(v, ctxt)) != 0 ) return rc;

return rc; ...

Is there any reason to not drop the if? as in the patch below.

Signed-off-by: Tony Breeds <to@bakeyournoodle.com>

-------- diff -r 6a666940fa04 xen/common/domain.c --- a/xen/common/domain.c Sun Nov 20 09:19:38 2005 +++ b/xen/common/domain.c Mon Nov 28 15:02:12 2005 @@ -380,9 +380,7 @@

BUG_ON(test_bit(_VCPUF_initialised, &v->vcpu_flags));

- if ( (rc = arch_set_info_guest(v, ctxt)) != 0 ) - return rc; - + rc = arch_set_info_guest(v, ctxt); return rc; }

Yours Tony

linux.conf.au http://linux.conf.au/ || http://lca2006.linux.org.au/ Jan 23-28 2006 The Australian Linux Technical Conference!