summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/file_io/CreateFileA/test1
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/file_io/CreateFileA/test1')
-rw-r--r--src/pal/tests/palsuite/file_io/CreateFileA/test1/CMakeLists.txt2
-rw-r--r--src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp (renamed from src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.c)4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pal/tests/palsuite/file_io/CreateFileA/test1/CMakeLists.txt b/src/pal/tests/palsuite/file_io/CreateFileA/test1/CMakeLists.txt
index 8814b22..edacdbd 100644
--- a/src/pal/tests/palsuite/file_io/CreateFileA/test1/CMakeLists.txt
+++ b/src/pal/tests/palsuite/file_io/CreateFileA/test1/CMakeLists.txt
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12.2)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(SOURCES
- CreateFileA.c
+ CreateFileA.cpp
)
add_executable(paltest_createfilea_test1
diff --git a/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.c b/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp
index a70867a..f98fc5b 100644
--- a/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.c
+++ b/src/pal/tests/palsuite/file_io/CreateFileA/test1/CreateFileA.cpp
@@ -21,7 +21,7 @@ BOOL Cleanup(void)
// loop through all accesses, modes, dispositions and flags
for (i=0; i<4*8*4*5; ++i) {
- sprintf(FileName, "test%03d.txt", i);
+ sprintf_s(FileName, _countof(FileName), "test%03d.txt", i);
if (DeleteFileA(FileName) == FALSE) {
if (GetLastError() != ERROR_FILE_NOT_FOUND) {
bRet = FALSE;
@@ -98,7 +98,7 @@ int __cdecl main(int argc, char *argv[])
// creation disp loop
for (l = 0; l < 5; l++)
{
- sprintf(lpFileName, "test%03d.txt", nCounter);
+ sprintf_s(lpFileName, _countof(lpFileName), "test%03d.txt", nCounter);
hFile = CreateFile(lpFileName,
dwDesiredAccess[i],
dwShareMode[j],