[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/9] QMP: check_opts(): Minor cleanup
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 6/9] QMP: check_opts(): Minor cleanup |
Date: |
Tue, 1 Jun 2010 17:41:34 -0300 |
We couldn't do it before, otherwise we would break the intention
of the previous checker, which was to ensure that opts_list wasn't
a NULL before checking it.
Debug code, pretty minor, still I decided to maintain its original
behavior.
Signed-off-by: Luiz Capitulino <address@hidden>
---
monitor.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/monitor.c b/monitor.c
index d2a510e..1875731 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4084,6 +4084,7 @@ static int monitor_can_read(void *opaque)
static int check_opts(QemuOptsList *opts_list, QDict *args)
{
+ assert(opts_list);
assert(!opts_list->desc->name);
return 0;
}
@@ -4188,7 +4189,6 @@ static void check_mandatory_args(const char *cmd_arg_name,
if (qstring_get_str(type)[0] == 'O') {
QemuOptsList *opts_list = qemu_find_opts(cmd_arg_name);
- assert(opts_list);
res->result = check_opts(opts_list, res->qdict);
res->skip = 1;
} else if (qstring_get_str(type)[0] != '-' &&
--
1.7.1.231.gd0b16
- Re: [Qemu-devel] [PATCH 1/9] QDict: Introduce qdict_get_try_bool(), (continued)
[Qemu-devel] [PATCH 2/9] Monitor: handle optional '-' arg as a bool, Luiz Capitulino, 2010/06/01
[Qemu-devel] [PATCH 5/9] QMP: Drop old client argument checker, Luiz Capitulino, 2010/06/01
[Qemu-devel] [PATCH 6/9] QMP: check_opts(): Minor cleanup,
Luiz Capitulino <=
[Qemu-devel] [PATCH 4/9] QMP: Second half of the new argument checking code, Luiz Capitulino, 2010/06/01
- Re: [Qemu-devel] [PATCH 4/9] QMP: Second half of the new argument checking code, Markus Armbruster, 2010/06/02
- [Qemu-devel] Handling the O-type, Luiz Capitulino, 2010/06/18
- Re: [Qemu-devel] Handling the O-type, Markus Armbruster, 2010/06/21
- Re: [Qemu-devel] Handling the O-type, Luiz Capitulino, 2010/06/21
- Re: [Qemu-devel] Handling the O-type, Markus Armbruster, 2010/06/21
[Qemu-devel] [PATCH 7/9] QError: Introduce QERR_QMP_BAD_INPUT_OBJECT_MEMBER, Luiz Capitulino, 2010/06/01