[PATCH] setupapi/tests: Get rid of variables holding empty strings

Vijay Kiran Kamuju infyquest at gmail.com
Wed Oct 23 03:59:11 CDT 2019


Signed-off-by: Vijay Kiran Kamuju <infyquest at gmail.com>
---
 dlls/setupapi/tests/diskspace.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/setupapi/tests/diskspace.c b/dlls/setupapi/tests/diskspace.c
index dab6705eee33..c92c15a821ae 100644
--- a/dlls/setupapi/tests/diskspace.c
+++ b/dlls/setupapi/tests/diskspace.c
@@ -375,8 +375,6 @@ static void test_SetupQuerySpaceRequiredOnDriveA(void)
 
 static void test_SetupQuerySpaceRequiredOnDriveW(void)
 {
-    static const WCHAR emptyW[] = {0};
-
     BOOL ret;
     HDSKSPC handle;
     LONGLONG space;
@@ -403,7 +401,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
        GetLastError());
 
     SetLastError(0xdeadbeef);
-    ret = SetupQuerySpaceRequiredOnDriveW(NULL, emptyW, NULL, NULL, 0);
+    ret = SetupQuerySpaceRequiredOnDriveW(NULL, L"", NULL, NULL, 0);
     ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
     ok(GetLastError() == ERROR_INVALID_HANDLE,
        "Expected GetLastError() to return ERROR_INVALID_HANDLE, got %u\n",
@@ -411,7 +409,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
 
     SetLastError(0xdeadbeef);
     space = 0xdeadbeef;
-    ret = SetupQuerySpaceRequiredOnDriveW(NULL, emptyW, &space, NULL, 0);
+    ret = SetupQuerySpaceRequiredOnDriveW(NULL, L"", &space, NULL, 0);
     ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
     ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
     ok(GetLastError() == ERROR_INVALID_HANDLE,
@@ -441,7 +439,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
        GetLastError());
 
     SetLastError(0xdeadbeef);
-    ret = SetupQuerySpaceRequiredOnDriveW(handle, emptyW, NULL, NULL, 0);
+    ret = SetupQuerySpaceRequiredOnDriveW(handle, L"", NULL, NULL, 0);
     ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
     ok(GetLastError() == ERROR_INVALID_DRIVE,
        "Expected GetLastError() to return ERROR_INVALID_PARAMETER, got %u\n",
@@ -449,7 +447,7 @@ static void test_SetupQuerySpaceRequiredOnDriveW(void)
 
     SetLastError(0xdeadbeef);
     space = 0xdeadbeef;
-    ret = SetupQuerySpaceRequiredOnDriveW(handle, emptyW, &space, NULL, 0);
+    ret = SetupQuerySpaceRequiredOnDriveW(handle, L"", &space, NULL, 0);
     ok(!ret, "Expected SetupQuerySpaceRequiredOnDriveW to return FALSE, got %d\n", ret);
     ok(space == 0xdeadbeef, "Expected output space parameter to be untouched\n");
     ok(GetLastError() == ERROR_INVALID_DRIVE,
-- 
2.21.0




More information about the wine-devel mailing list