mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qapi: Drop superfluous qapi_enum_parse() parameter max
The lookup tables have a sentinel, no need to make callers pass their size. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1503564371-26090-3-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Rebased, commit message corrected]
This commit is contained in:
parent
64355088e0
commit
06c60b6c46
15 changed files with 22 additions and 37 deletions
|
@ -89,8 +89,7 @@ static int global_state_post_load(void *opaque, int version_id)
|
|||
s->received = true;
|
||||
trace_migrate_global_state_post_load(runstate);
|
||||
|
||||
r = qapi_enum_parse(RunState_lookup, runstate, RUN_STATE__MAX,
|
||||
-1, &local_err);
|
||||
r = qapi_enum_parse(RunState_lookup, runstate, -1, &local_err);
|
||||
|
||||
if (r == -1) {
|
||||
if (local_err) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue