Skip to contentSkip to conversation

Drop useless if() ?

PATCH New Tony Breeds 1 participant 1 message Nov 28, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

--------

xen/common/domain.c +1 -3
diff -r 6a666940fa04 xen/common/domain.c
@@ -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!