trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sure...@apache.org
Subject [2/4] incubator-trafodion git commit: Code review fixes.
Date Tue, 01 Aug 2017 18:43:32 GMT
Code review fixes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/9e4630d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/9e4630d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/9e4630d1

Branch: refs/heads/master
Commit: 9e4630d1d480b5f5e4bdfdf34b58bf4bfea9623f
Parents: f3293e4
Author: Zalo Correa <zalo.correa@esgyn.com>
Authored: Mon Jul 31 19:13:28 2017 -0700
Committer: Zalo Correa <zalo.correa@esgyn.com>
Committed: Mon Jul 31 19:13:28 2017 -0700

----------------------------------------------------------------------
 core/sqf/monitor/linux/cluster.cxx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/9e4630d1/core/sqf/monitor/linux/cluster.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/cluster.cxx b/core/sqf/monitor/linux/cluster.cxx
index 4a26e1c..585ff0a 100644
--- a/core/sqf/monitor/linux/cluster.cxx
+++ b/core/sqf/monitor/linux/cluster.cxx
@@ -733,21 +733,22 @@ void CCluster::HardNodeDown (int pnid, bool communicate_state)
         else
         {
             // Remove the domain portion of the name if any
-            char my_node_name[MPI_MAX_PROCESSOR_NAME];
+            char short_node_name[MPI_MAX_PROCESSOR_NAME];
             char str1[MPI_MAX_PROCESSOR_NAME];
+            memset( short_node_name, 0, MPI_MAX_PROCESSOR_NAME );
             memset( str1, 0, MPI_MAX_PROCESSOR_NAME );
             strcpy (str1, node->GetName() );
         
             char *str1_dot = strchr( (char *) str1, '.' );
             if ( str1_dot )
             {
-                memcpy( my_node_name, str1, str1_dot - str1 );
+                memcpy( short_node_name, str1, str1_dot - str1 );
             }
             else
             {
-                strcpy (my_node_name, str1 );
+                strcpy (short_node_name, str1 );
             }
-            snprintf(port_fname, sizeof(port_fname), "%s/monitor.port.%s",getenv("MPI_TMPDIR"),my_node_name);
+            snprintf(port_fname, sizeof(port_fname), "%s/monitor.port.%s",getenv("MPI_TMPDIR"),short_node_name);
         }
         sprintf(temp_fname, "%s.bak", port_fname);
         remove(temp_fname);


Mime
View raw message