[KERNEL32_WINETEST]

- Do not use strcat_s. It is not guaranteed to exist on Windows.

svn path=/trunk/; revision=54324
This commit is contained in:
Thomas Faber 2011-11-06 23:38:39 +00:00
parent 1a2f9d3279
commit 1f8bcd7af2

View file

@ -19,6 +19,7 @@
*/
#include <stdarg.h>
#include <stdio.h>
#include "wine/test.h"
#include "windef.h"
@ -235,8 +236,7 @@ static void test_DefineDosDeviceA(void)
/* Test with trailing '\' appended to TargetPath */
dwMaskPrev = GetLogicalDrives();
strcpy_s(Buffer, MAX_PATH, Target);
strcat_s(Buffer, MAX_PATH, "\\\\\\");
snprintf(Buffer, sizeof(Buffer), "%s\\\\\\", Target);
Result = DefineDosDeviceA(0, SUBST_DRIVE, Buffer);
ok(Result, "Failed to subst drive\n");
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);
@ -256,9 +256,7 @@ static void test_DefineDosDeviceA(void)
/* Test with trailing '\' appended to TargetPath and DDD_RAW_TARGET_PATH flag */
dwMaskPrev = GetLogicalDrives();
strcpy_s(Buffer, MAX_PATH, "\\??\\");
strcat_s(Buffer, MAX_PATH, Target);
strcat_s(Buffer, MAX_PATH, "\\\\\\");
snprintf(Buffer, sizeof(Buffer), "\\??\\%s\\\\\\", Target);
Result = DefineDosDeviceA(DDD_RAW_TARGET_PATH, SUBST_DRIVE, Buffer);
ok(Result, "Failed to subst drive\n");
DriveType1 = GetDriveTypeA(SUBST_DRIVE_WITH_TRAILING_PATH_SEPERATOR);