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

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2017-06-30 13:42:43 +00:00 committed by Alexandre Julliard
parent 2db2a7aeef
commit c750c2a98d
1 changed files with 2 additions and 7 deletions

View File

@ -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;
}
}