cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke4...@apache.org
Subject [19/50] [abbrv] git commit: updated refs/heads/4.5 to 50ee981
Date Mon, 13 Oct 2014 04:41:36 GMT
Fixed few coverity issues

(cherry picked from commit 45597766a5d5f8453878de29654aa061d05eabd3)


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

Branch: refs/heads/4.5
Commit: 0df43197d9211d5327691c689c6aeb5ae960f865
Parents: c90db15
Author: Santhosh Edukulla <santhosh.edukulla@gmail.com>
Authored: Tue Oct 7 12:19:39 2014 +0530
Committer: David Nalley <david@gnsa.us>
Committed: Mon Oct 13 00:30:01 2014 -0400

----------------------------------------------------------------------
 .../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/0df43197/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/0df43197/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();


Mime
View raw message