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:
Markus Armbruster 2017-08-24 10:45:57 +02:00
parent 64355088e0
commit 06c60b6c46
15 changed files with 22 additions and 37 deletions

2
hmp.c
View file

@ -1742,7 +1742,7 @@ void hmp_change(Monitor *mon, const QDict *qdict)
if (read_only) {
read_only_mode =
qapi_enum_parse(BlockdevChangeReadOnlyMode_lookup,
read_only, BLOCKDEV_CHANGE_READ_ONLY_MODE__MAX,
read_only,
BLOCKDEV_CHANGE_READ_ONLY_MODE_RETAIN, &err);
if (err) {
hmp_handle_error(mon, &err);