Commit c750c2a9 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

regedit: Remove un-necessary parser state assignment if we are returning to the same state.

parent 2db2a7ae
......@@ -532,7 +532,7 @@ static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos)
return NULL;
if (strncmpW(line, hkcr, ARRAY_SIZE(hkcr)))
goto invalid;
return line;
/* get key name */
while (line[key_end] && !isspaceW(line[key_end])) key_end++;
......@@ -548,7 +548,7 @@ static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos)
if (open_key(parser, line) != ERROR_SUCCESS)
{
output_message(STRING_OPEN_KEY_FAILED, line);
goto invalid;
return line;
}
parser->value_name = NULL;
......@@ -558,10 +558,6 @@ static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos)
set_state(parser, SET_VALUE);
return value;
invalid:
set_state(parser, PARSE_WIN31_LINE);
return line;
}
/* handler for parser LINE_START state */
......@@ -589,7 +585,6 @@ static WCHAR *line_start_state(struct parser *parser, WCHAR *pos)
case '\t':
break;
default:
set_state(parser, LINE_START);
return p;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment