[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] Drop useless if() ?



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 <tony@xxxxxxxxxxxxxxxxxx>
--------
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!


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.