aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
Diffstat (limited to 'qapi')
-rw-r--r--qapi/qapi-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qapi/qapi-util.c b/qapi/qapi-util.c
index 46eda7d196..ee7594ff19 100644
--- a/qapi/qapi-util.c
+++ b/qapi/qapi-util.c
@@ -16,7 +16,7 @@
#include "qapi/util.h"
int qapi_enum_parse(const char * const lookup[], const char *buf,
- int max, int def, Error **errp)
+ int def, Error **errp)
{
int i;
@@ -24,7 +24,7 @@ int qapi_enum_parse(const char * const lookup[], const char *buf,
return def;
}
- for (i = 0; i < max; i++) {
+ for (i = 0; lookup[i]; i++) {
if (!strcmp(buf, lookup[i])) {
return i;
}