diff --git a/projects/hip-tests/catch/unit/memory/mempool_common.hh b/projects/hip-tests/catch/unit/memory/mempool_common.hh index 1a01f567b9..8720a386ed 100644 --- a/projects/hip-tests/catch/unit/memory/mempool_common.hh +++ b/projects/hip-tests/catch/unit/memory/mempool_common.hh @@ -636,9 +636,7 @@ public: // Construct client address to send this SHareable handle to bzero(&cliaddr, sizeof(cliaddr)); cliaddr.sun_family = AF_UNIX; - char temp[10]; - sprintf(temp, "%u", process); - strcpy(cliaddr.sun_path, temp); + strcpy(cliaddr.sun_path, std::to_string(process).c_str()); // Send corresponding shareable handle to the client int sendfd = (int)shareableHdl; diff --git a/projects/hip-tests/catch/unit/virtualMemoryManagement/hip_vmm_common.hh b/projects/hip-tests/catch/unit/virtualMemoryManagement/hip_vmm_common.hh index ff754ca0d3..2cb58d4970 100644 --- a/projects/hip-tests/catch/unit/virtualMemoryManagement/hip_vmm_common.hh +++ b/projects/hip-tests/catch/unit/virtualMemoryManagement/hip_vmm_common.hh @@ -230,9 +230,7 @@ public: // Construct client address to send this SHareable handle to bzero(&cliaddr, sizeof(cliaddr)); cliaddr.sun_family = AF_UNIX; - char temp[10]; - sprintf(temp, "%u", process); - strcpy(cliaddr.sun_path, temp); + strcpy(cliaddr.sun_path, std::to_string(process).c_str()); // Send corresponding shareable handle to the client int sendfd = (int)shareableHdl;