qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]