Author: cwittich
Date: Mon Apr 20 10:13:00 2009
New Revision: 40602

URL: http://svn.reactos.org/svn/reactos?rev=40602&view=rev
Log:
fix 4 setupapi parser winetests

Modified:
    trunk/reactos/dll/win32/setupapi/parser.c

Modified: trunk/reactos/dll/win32/setupapi/parser.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/parser.c?rev=40602&r1=40601&r2=40602&view=diff
==============================================================================
--- trunk/reactos/dll/win32/setupapi/parser.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/setupapi/parser.c [iso-8859-1] Mon Apr 20 10:13:00 
2009
@@ -1494,11 +1494,9 @@
     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;
@@ -1513,6 +1511,7 @@
         index -= file->sections[section_index]->nb_lines;
     }
     TRACE( "(%p,%s) not found\n", hinf, debugstr_w(section) );
+       SetLastError( ERROR_LINE_NOT_FOUND );
     return FALSE;
 }
 
@@ -1554,7 +1553,6 @@
     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;
@@ -1567,7 +1565,6 @@
             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;
@@ -1581,6 +1578,7 @@
         }
     }
     TRACE( "(%p,%s,%s): not found\n", hinf, debugstr_w(section), 
debugstr_w(key) );
+       SetLastError( ERROR_LINE_NOT_FOUND );
     return FALSE;
 }
 

Reply via email to