You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/03/01 02:18:31 UTC

[GitHub] cjolivier01 commented on a change in pull request #9933: Adding support to profile kvstore server during distributed training

cjolivier01 commented on a change in pull request #9933: Adding support to profile kvstore server during distributed training
URL: https://github.com/apache/incubator-mxnet/pull/9933#discussion_r171446726
 
 

 ##########
 File path: src/kvstore/kvstore_dist_server.h
 ##########
 @@ -202,12 +203,12 @@ class KVStoreDistServer {
       if (parts[0] == "filename") {
         parts[1] = "rank" + std::to_string(ps::MyRank()) + "_" + parts[1];
       }
-      char * ckey = new char [parts[0].length()+1];
-      std::strcpy (ckey, parts[0].c_str());
+      char * ckey = new char[parts[0].length() + 1];
+      std::sprintf(ckey, "%s", parts[0].c_str());
 
 Review comment:
   why? this would be slower 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services