[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/17] json-parser: drop superfluous assignment for t
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PULL 17/17] json-parser: drop superfluous assignment for token variable |
Date: |
Wed, 11 Jun 2014 10:51:02 -0400 |
From: Gonglei <address@hidden>
Signed-off-by: ChenLiang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
qobject/json-parser.c | 15 ++-------------
1 file 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);
--
1.9.3
- [Qemu-devel] [PULL 06/17] dump: hoist lzo_init() from get_len_buf_out() to dump_init(), (continued)
- [Qemu-devel] [PULL 06/17] dump: hoist lzo_init() from get_len_buf_out() to dump_init(), Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 11/17] net: Export valid host network devices list, Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 12/17] monitor: Add host_net_add device argument completion, Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 05/17] dump: select header bitness based on ELF class, not ELF architecture, Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 04/17] dump: eliminate DumpState.page_size ("guest's page size"), Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 10/17] monitor: Add migrate_set_capability completion, Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 03/17] dump: eliminate DumpState.page_shift ("guest's page shift"), Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 16/17] readline: Clear screen on form feed., Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 15/17] monitor: Add delvm and loadvm argument completion, Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 14/17] monitor: Add host_net_remove arguments completion, Luiz Capitulino, 2014/06/11
- [Qemu-devel] [PULL 17/17] json-parser: drop superfluous assignment for token variable,
Luiz Capitulino <=
- Re: [Qemu-devel] [PULL 00/17] QMP queue, Peter Maydell, 2014/06/11