Minor Boolean expression simplification

Signed-off-by: Laszlo Hornyak <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d6a6e8df
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d6a6e8df
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d6a6e8df

Branch: refs/heads/master
Commit: d6a6e8dfa5d873baa05dc8fbce692d08c5235c3f
Parents: 74a3cb4
Author: Laszlo Hornyak <[email protected]>
Authored: Sun Feb 9 19:05:28 2014 +0100
Committer: Laszlo Hornyak <[email protected]>
Committed: Sun Feb 9 19:05:28 2014 +0100

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d6a6e8df/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
index c66c51a..a5f33eb 100644
--- 
a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
+++ 
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
@@ -310,11 +310,7 @@ public class LibvirtStorageAdaptor implements 
StorageAdaptor {
             throw new InternalErrorException("volume:" + srcPath + " is not 
exits");
         }
         String result = Script.runSimpleBashScript("cp " + srcPath + " " + 
destPath + File.separator + volumeName, timeout);
-        if (result != null) {
-            return false;
-        } else {
-            return true;
-        }
+        return result == null;
     }
 
     public LibvirtStoragePoolDef getStoragePoolDef(Connect conn, StoragePool 
pool) throws LibvirtException {

Reply via email to