diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-06-11 21:34:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-06-11 21:34:08 +0100 |
commit | 05fedeef835c3c889e5d2e44f8abb11dcfcadefc (patch) | |
tree | 8dbcf074dec8246cb542e68f6b84c7abf5176e50 /qobject/json-parser.c | |
parent | 706808585a49bfd266e00b1c7723b6e1b0f4ff35 (diff) | |
parent | a491af471bf8f1188b2665f54d109065d4591e45 (diff) | |
download | qemu-05fedeef835c3c889e5d2e44f8abb11dcfcadefc.zip qemu-05fedeef835c3c889e5d2e44f8abb11dcfcadefc.tar.gz qemu-05fedeef835c3c889e5d2e44f8abb11dcfcadefc.tar.bz2 |
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
json-parser: drop superfluous assignment for token variable
readline: Clear screen on form feed.
monitor: Add delvm and loadvm argument completion
monitor: Add host_net_remove arguments completion
readline: Make completion strings always unique
monitor: Add host_net_add device argument completion
net: Export valid host network devices list
monitor: Add migrate_set_capability completion
monitor: Add watchdog_action argument completion
monitor: Add ringbuf_write and ringbuf_read argument completion
dump: simplify get_len_buf_out()
dump: hoist lzo_init() from get_len_buf_out() to dump_init()
dump: select header bitness based on ELF class, not ELF architecture
dump: eliminate DumpState.page_size ("guest's page size")
dump: eliminate DumpState.page_shift ("guest's page shift")
dump: simplify write_start_flat_header()
dump: fill in the flat header signature more pleasingly to the eye
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qobject/json-parser.c')
-rw-r--r-- | qobject/json-parser.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/qobject/json-parser.c b/qobject/json-parser.c index e46c264..4288267 100644 --- a/qobject/json-parser.c +++ b/qobject/json-parser.c @@ -423,7 +423,6 @@ static QObject *parse_object(JSONParserContext *ctxt, va_list *ap) if (!token_is_operator(token, '{')) { goto out; } - token = NULL; dict = qdict_new(); @@ -449,7 +448,6 @@ static QObject *parse_object(JSONParserContext *ctxt, va_list *ap) parse_error(ctxt, token, "expected separator in dict"); goto out; } - token = NULL; if (parse_pair(ctxt, dict, ap) == -1) { goto out; @@ -461,10 +459,8 @@ static QObject *parse_object(JSONParserContext *ctxt, va_list *ap) goto out; } } - token = NULL; } else { - token = parser_context_pop_token(ctxt); - token = NULL; + (void)parser_context_pop_token(ctxt); } return QOBJECT(dict); @@ -487,10 +483,8 @@ static QObject *parse_array(JSONParserContext *ctxt, va_list *ap) } if (!token_is_operator(token, '[')) { - token = NULL; goto out; } - token = NULL; list = qlist_new(); @@ -523,8 +517,6 @@ static QObject *parse_array(JSONParserContext *ctxt, va_list *ap) goto out; } - token = NULL; - obj = parse_value(ctxt, ap); if (obj == NULL) { parse_error(ctxt, token, "expecting value"); @@ -539,11 +531,8 @@ static QObject *parse_array(JSONParserContext *ctxt, va_list *ap) goto out; } } - - token = NULL; } else { - token = parser_context_pop_token(ctxt); - token = NULL; + (void)parser_context_pop_token(ctxt); } return QOBJECT(list); |