setupapi: Fix some last errors for SetupFindFirstLine.
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 @@
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 @@
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 @@
}
}
TRACE( "(%p,%s,%s): not found\n", hinf, debugstr_w(section), debugstr_w(key) );
+ SetLastError( ERROR_LINE_NOT_FOUND );
return FALSE;
}