Paul Vriens : setupapi: Fix some last errors for SetupGetLineByIndex.
Alexandre Julliard
julliard at winehq.org
Sat Mar 29 06:56:43 CDT 2008
Module: wine
Branch: master
Commit: a3557272f4a3f58a579ae51aa267a9148eae0b01
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a3557272f4a3f58a579ae51aa267a9148eae0b01
Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date: Fri Mar 28 16:41:20 2008 +0100
setupapi: Fix some last errors for SetupGetLineByIndex.
---
dlls/setupapi/parser.c | 3 +--
dlls/setupapi/tests/parser.c | 1 -
2 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c
index d266cf8..f6de4ed 100644
--- a/dlls/setupapi/parser.c
+++ b/dlls/setupapi/parser.c
@@ -1311,11 +1311,9 @@ BOOL WINAPI SetupGetLineByIndexW( HINF hinf, PCWSTR section, DWORD index, INFCON
struct inf_file *file = hinf;
int section_index;
- SetLastError( ERROR_SECTION_NOT_FOUND );
for (file = hinf; file; file = file->next)
{
if ((section_index = find_section( file, section )) == -1) continue;
- SetLastError( ERROR_LINE_NOT_FOUND );
if (index < file->sections[section_index]->nb_lines)
{
context->Inf = hinf;
@@ -1330,6 +1328,7 @@ BOOL WINAPI SetupGetLineByIndexW( HINF hinf, PCWSTR section, DWORD index, INFCON
index -= file->sections[section_index]->nb_lines;
}
TRACE( "(%p,%s) not found\n", hinf, debugstr_w(section) );
+ SetLastError( ERROR_LINE_NOT_FOUND );
return FALSE;
}
diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c
index 1c74bd3..d49c37f 100644
--- a/dlls/setupapi/tests/parser.c
+++ b/dlls/setupapi/tests/parser.c
@@ -571,7 +571,6 @@ static void test_GLE(void)
SetLastError(0xdeadbeef);
retb = SetupGetLineByIndexA( hinf, "ImNotThere", 1, &context );
ok(!retb, "Expected failure\n");
- todo_wine
ok(GetLastError() == ERROR_LINE_NOT_FOUND,
"Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
More information about the wine-cvs
mailing list