diff --git a/unit-test/ds_file_tests.c b/unit-test/ds_file_tests.c index b8590a5..f978e31 100644 --- a/unit-test/ds_file_tests.c +++ b/unit-test/ds_file_tests.c @@ -960,12 +960,12 @@ void DS_FileCloseDest_Test_PlatformConfigMoveFiles_MoveError(void) void DS_FileCloseDest_Test_PlatformConfigMoveFiles_FilenameTooLarge(void) { int32 FileIndex = 0; - + const char DirName[] = "directory1/"; + /* Set up the handle */ OS_OpenCreate(&DS_AppData.FileStatus[FileIndex].FileHandle, NULL, 0, 0); - - const char DirName[] = "directory1/"; - size_t DirNameLen = sizeof(DirName)/sizeof(char); + + size_t DirNameLen = sizeof(DirName); strncpy(DS_AppData.FileStatus[FileIndex].FileName, DirName, DirNameLen); memset(&DS_AppData.FileStatus[FileIndex].FileName[DirNameLen-1], 'f', DS_TOTAL_FNAME_BUFSIZE - DirNameLen); DS_AppData.FileStatus[FileIndex].FileName[DS_TOTAL_FNAME_BUFSIZE-1] = '\0';