Paul Vriens : setupapi: Fix some last errors for SetupFindFirstLine.

Alexandre Julliard julliard at winehq.org
Sat Mar 29 06:56:41 CDT 2008


Module: wine
Branch: master
Commit: 50e81d0e6d4fcf547fbbd9679d1a4f1f3a3a1eed
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=50e81d0e6d4fcf547fbbd9679d1a4f1f3a3a1eed

Author: Paul Vriens <paul.vriens.wine at gmail.com>
Date:   Fri Mar 28 16:29:52 2008 +0100

setupapi: Fix some last errors for SetupFindFirstLine.

---

 dlls/setupapi/parser.c       |    3 +--
 dlls/setupapi/tests/parser.c |    3 ---
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/dlls/setupapi/parser.c b/dlls/setupapi/parser.c
index fe2011e..d266cf8 100644
--- a/dlls/setupapi/parser.c
+++ b/dlls/setupapi/parser.c
@@ -1371,7 +1371,6 @@ BOOL WINAPI SetupFindFirstLineW( HINF hinf, PCWSTR section, PCWSTR key, INFCONTE
     struct inf_file *file;
     int section_index;
 
-    SetLastError( ERROR_SECTION_NOT_FOUND );
     for (file = hinf; file; file = file->next)
     {
         if ((section_index = find_section( file, section )) == -1) continue;
@@ -1384,7 +1383,6 @@ BOOL WINAPI SetupFindFirstLineW( HINF hinf, PCWSTR section, PCWSTR key, INFCONTE
             ctx.Line       = -1;
             return SetupFindNextMatchLineW( &ctx, key, context );
         }
-        SetLastError( ERROR_LINE_NOT_FOUND );  /* found at least one section */
         if (file->sections[section_index]->nb_lines)
         {
             context->Inf        = hinf;
@@ -1398,6 +1396,7 @@ BOOL WINAPI SetupFindFirstLineW( HINF hinf, PCWSTR section, PCWSTR key, INFCONTE
         }
     }
     TRACE( "(%p,%s,%s): not found\n", hinf, debugstr_w(section), debugstr_w(key) );
+    SetLastError( ERROR_LINE_NOT_FOUND );
     return FALSE;
 }
 
diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c
index d36a729..1c74bd3 100644
--- a/dlls/setupapi/tests/parser.c
+++ b/dlls/setupapi/tests/parser.c
@@ -499,14 +499,12 @@ static void test_GLE(void)
     SetLastError(0xdeadbeef);
     retb = SetupFindFirstLineA( hinf, "ImNotThere", NULL, &context );
     ok(!retb, "Expected failure\n");
-    todo_wine
     ok(GetLastError() == ERROR_LINE_NOT_FOUND,
         "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
 
     SetLastError(0xdeadbeef);
     retb = SetupFindFirstLineA( hinf, "ImNotThere", "ImNotThere", &context );
     ok(!retb, "Expected failure\n");
-    todo_wine
     ok(GetLastError() == ERROR_LINE_NOT_FOUND,
         "Expected ERROR_LINE_NOT_FOUND, got %08x\n", GetLastError());
 
@@ -555,7 +553,6 @@ static void test_GLE(void)
     SetLastError(0xdeadbeef);
     retb = SetupGetLineTextA( NULL, hinf, "ImNotThere", "ImNotThere", buf, bufsize, &retsize);
     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