Module: wine Branch: master Commit: 7204f0f67f9fbd8765fce86c4195269c4f5aa876 URL: https://source.winehq.org/git/wine.git/?a=commit;h=7204f0f67f9fbd8765fce86c4...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Apr 23 11:12:50 2019 +0200
setupapi/tests: Avoid using snprintf().
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/setupapi/tests/install.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c index a3b562e..4232212 100644 --- a/dlls/setupapi/tests/install.c +++ b/dlls/setupapi/tests/install.c @@ -455,7 +455,7 @@ static void test_profile_items(void) goto cleanup; }
- snprintf(path, MAX_PATH, "%s\TestDir", commonprogs); + sprintf(path, "%s\TestDir", commonprogs); if (!CreateDirectoryA(path, NULL) && GetLastError() == ERROR_ACCESS_DENIED) { skip("need admin rights\n"); @@ -467,23 +467,23 @@ static void test_profile_items(void) sprintf(path, "%s\%s", CURR_DIR, inffile); run_cmdline("DefaultInstall", 128, path);
- snprintf(path, MAX_PATH, "%s\TestItem.lnk", commonprogs); - snprintf(path, MAX_PATH, "%s\TestDir", commonprogs); + sprintf(path, "%s\TestItem.lnk", commonprogs); + sprintf(path, "%s\TestDir", commonprogs); ok(INVALID_FILE_ATTRIBUTES != GetFileAttributesA(path), "directory not created\n"); - snprintf(path, MAX_PATH, "%s\TestDir\TestItem2.lnk", commonprogs); + sprintf(path, "%s\TestDir\TestItem2.lnk", commonprogs); ok(INVALID_FILE_ATTRIBUTES != GetFileAttributesA(path), "link not created\n"); - snprintf(path, MAX_PATH, "%s\TestGroup", commonprogs); + sprintf(path, "%s\TestGroup", commonprogs); ok(INVALID_FILE_ATTRIBUTES != GetFileAttributesA(path), "group not created\n");
- snprintf(path, MAX_PATH, "%s\TestItem.lnk", commonprogs); + sprintf(path, "%s\TestItem.lnk", commonprogs); DeleteFileA(path); - snprintf(path, MAX_PATH, "%s\TestDir\TestItem2.lnk", commonprogs); + sprintf(path, "%s\TestDir\TestItem2.lnk", commonprogs); DeleteFileA(path); - snprintf(path, MAX_PATH, "%s\TestItem2.lnk", commonprogs); + sprintf(path, "%s\TestItem2.lnk", commonprogs); DeleteFileA(path); - snprintf(path, MAX_PATH, "%s\TestDir", commonprogs); + sprintf(path, "%s\TestDir", commonprogs); RemoveDirectoryA(path); - snprintf(path, MAX_PATH, "%s\TestGroup", commonprogs); + sprintf(path, "%s\TestGroup", commonprogs); RemoveDirectoryA(path);
cleanup: