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

View file

@ -304,7 +304,7 @@ static bool get_aio_option(QemuOpts *opts, int flags, Error **errp)
aio_default = (flags & BDRV_O_NATIVE_AIO) ? BLOCKDEV_AIO_OPTIONS_NATIVE
: BLOCKDEV_AIO_OPTIONS_THREADS;
aio = qapi_enum_parse(BlockdevAioOptions_lookup, qemu_opt_get(opts, "aio"),
BLOCKDEV_AIO_OPTIONS__MAX, aio_default, errp);
aio_default, errp);
switch (aio) {
case BLOCKDEV_AIO_OPTIONS_NATIVE: