mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00: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:
@@ -3491,8 +3491,7 @@ static int img_resize(int argc, char **argv)
|
||||
break;
|
||||
case OPTION_PREALLOCATION:
|
||||
prealloc = qapi_enum_parse(PreallocMode_lookup, optarg,
|
||||
PREALLOC_MODE__MAX, PREALLOC_MODE__MAX,
|
||||
NULL);
|
||||
PREALLOC_MODE__MAX, NULL);
|
||||
if (prealloc == PREALLOC_MODE__MAX) {
|
||||
error_report("Invalid preallocation mode '%s'", optarg);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user