From 06c60b6c468ca7cde004fe7c3ce35de312855f55 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 24 Aug 2017 10:45:57 +0200 Subject: qapi: Drop superfluous qapi_enum_parse() parameter max MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The lookup tables have a sentinel, no need to make callers pass their size. Signed-off-by: Markus Armbruster Message-Id: <1503564371-26090-3-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau Reviewed-by: Eric Blake [Rebased, commit message corrected] --- migration/global_state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'migration') diff --git a/migration/global_state.c b/migration/global_state.c index dcbbcb2..88c55f8 100644 --- a/migration/global_state.c +++ b/migration/global_state.c @@ -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) { -- cgit v1.1