diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-08-24 10:45:57 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-09-04 13:09:13 +0200 |
commit | 06c60b6c468ca7cde004fe7c3ce35de312855f55 (patch) | |
tree | 33e164badc15e320421ba47f5a26a622f4d85dee /block/parallels.c | |
parent | 64355088e0213b564eb6ef5d2658210accfcc32f (diff) |
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]
Diffstat (limited to 'block/parallels.c')
-rw-r--r-- | block/parallels.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/parallels.c b/block/parallels.c index e1e06d23cc..eb92366e51 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -697,7 +697,8 @@ static int parallels_open(BlockDriverState *bs, QDict *options, int flags, s->prealloc_size = MAX(s->tracks, s->prealloc_size >> BDRV_SECTOR_BITS); buf = qemu_opt_get_del(opts, PARALLELS_OPT_PREALLOC_MODE); s->prealloc_mode = qapi_enum_parse(prealloc_mode_lookup, buf, - PRL_PREALLOC_MODE__MAX, PRL_PREALLOC_MODE_FALLOCATE, &local_err); + PRL_PREALLOC_MODE_FALLOCATE, + &local_err); g_free(buf); if (local_err != NULL) { goto fail_options; |