Module: wine Branch: master Commit: 405b96e979dcb751988e061cd1f78319232d3d84 URL: http://source.winehq.org/git/wine.git/?a=commit;h=405b96e979dcb751988e061cd1...
Author: James Hawkins truiken@gmail.com Date: Wed Mar 28 01:57:33 2007 -0500
setupapi: SetLastError to ERROR_SUCCESS on success.
---
dlls/setupapi/misc.c | 2 ++ dlls/setupapi/tests/misc.c | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 4c7786f..04941a5 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -921,6 +921,7 @@ done: MyFree( destW ); HeapFree( GetProcessHeap(), 0, sourceW ); HeapFree( GetProcessHeap(), 0, locationW ); + if (ret) SetLastError(ERROR_SUCCESS); return ret; }
@@ -980,6 +981,7 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR source, PCWSTR location,
if (component) *component = p + 1; if (required_size) *required_size = size; + if (ret) SetLastError(ERROR_SUCCESS);
return ret; } diff --git a/dlls/setupapi/tests/misc.c b/dlls/setupapi/tests/misc.c index d566816..2efaa64 100644 --- a/dlls/setupapi/tests/misc.c +++ b/dlls/setupapi/tests/misc.c @@ -243,11 +243,8 @@ static void test_SetupCopyOEMInf(void) SetLastError(0xdeadbeef); res = SetupCopyOEMInf(path, NULL, SPOST_NONE, SP_COPY_DELETESOURCE, NULL, 0, NULL, NULL); ok(res == TRUE, "Expected TRUE, got %d\n", res); + ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); ok(!file_exists(path), "Expected source inf to not exist\n"); - todo_wine - { - ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); - } }
START_TEST(misc)