From 487767cfc8fc74a61dc593ff7e96120e037ab7f5 Mon Sep 17 00:00:00 2001 From: Hafiz Abid Qadeer Date: Wed, 12 Mar 2014 10:53:50 +0000 Subject: Replace some Windows specific string functions with std::string. llvm-svn: 203654 --- lldb/source/Host/common/FileSpec.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lldb') diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index 48f1ac78d92..d4634ece83f 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -936,12 +936,11 @@ FileSpec::EnumerateDirectory if (dir_path && dir_path[0]) { #if _WIN32 - char szDir[MAX_PATH]; - strcpy_s(szDir, MAX_PATH, dir_path); - strcat_s(szDir, MAX_PATH, "\\*"); + std::string szDir(dir_path); + szDir += "\\*"; WIN32_FIND_DATA ffd; - HANDLE hFind = FindFirstFile(szDir, &ffd); + HANDLE hFind = FindFirstFile(szDir.c_str(), &ffd); if (hFind == INVALID_HANDLE_VALUE) { -- cgit v1.2.1