Repository: cloudstack
Updated Branches:
  refs/heads/master d7dea70e8 -> 45597766a


Fixed few coverity issues


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

Branch: refs/heads/master
Commit: 45597766a5d5f8453878de29654aa061d05eabd3
Parents: d7dea70
Author: Santhosh Edukulla <santhosh.eduku...@gmail.com>
Authored: Tue Oct 7 12:19:39 2014 +0530
Committer: Santhosh Edukulla <santhosh.eduku...@gmail.com>
Committed: Tue Oct 7 12:19:39 2014 +0530

----------------------------------------------------------------------
 .../hypervisor/xenserver/resource/CitrixResourceBase.java     | 7 ++-----
 .../src/com/cloud/configuration/ConfigurationManagerImpl.java | 7 ++++---
 2 files changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/45597766/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
 
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
index 9313e56..e3c3943 100644
--- 
a/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
+++ 
b/plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/CitrixResourceBase.java
@@ -4440,16 +4440,13 @@ public abstract class CitrixResourceBase implements 
ServerResource, HypervisorRe
         cmd.setCluster(_cluster);
         cmd.setPoolSync(false);
 
-        Pool pool;
         try {
-            pool = Pool.getByUuid(conn, _host.pool);
+            Pool pool = Pool.getByUuid(conn, _host.pool);
             Pool.Record poolr = pool.getRecord(conn);
-
-            Host.Record hostr = poolr.master.getRecord(conn);
+            poolr.master.getRecord(conn);
         } catch (Throwable e) {
             s_logger.warn("Check for master failed, failing the FULL Cluster 
sync command");
         }
-
         StartupStorageCommand sscmd = initializeLocalSR(conn);
         if (sscmd != null) {
             return new StartupCommand[] {cmd, sscmd};

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/45597766/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java 
b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index df6ce45..eca9080 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -3964,8 +3964,9 @@ public class ConfigurationManagerImpl extends ManagerBase 
implements Configurati
                         + " capabilities can be sepcified for source nat 
service");
             }
 
-            for (Capability capability : 
sourceNatServiceCapabilityMap.keySet()) {
-                String value = sourceNatServiceCapabilityMap.get(capability);
+            for (Map.Entry<Capability ,String> srcNatPair : 
sourceNatServiceCapabilityMap.entrySet()) {
+                Capability capability = srcNatPair.getKey();
+                String value = srcNatPair.getValue();
                 if (capability == Capability.SupportedSourceNatTypes) {
                     boolean perAccount = value.contains("peraccount");
                     boolean perZone = value.contains("perzone");
@@ -4284,7 +4285,7 @@ public class ConfigurationManagerImpl extends ManagerBase 
implements Configurati
     @Override
     public Pair<List<? extends NetworkOffering>, Integer> 
searchForNetworkOfferings(ListNetworkOfferingsCmd cmd) {
         Boolean isAscending = 
Boolean.parseBoolean(_configDao.getValue("sortkey.algorithm"));
-        isAscending = (isAscending == null ? true : isAscending);
+        isAscending = (isAscending == null ? Boolean.TRUE : isAscending);
         Filter searchFilter = new Filter(NetworkOfferingVO.class, "sortKey", 
isAscending, null, null);
         Account caller = CallContext.current().getCallingAccount();
         SearchCriteria<NetworkOfferingVO> sc = 
_networkOfferingDao.createSearchCriteria();

Reply via email to