WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Drop useless if() ?
From: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Nov 2005 15:18:25 +1100
Delivery-date: Mon, 28 Nov 2005 04:18:27 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Xen Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Drop useless if() ?, Tony Breeds <=