qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amos Kong <akong@redhat.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, qiaonuohan@cn.fujitsu.com,
	xiawenc@linux.vnet.ibm.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH v3 1/3] qapi: cleanup redundant variable
Date: Sun,  5 Jan 2014 20:02:29 +0800	[thread overview]
Message-ID: <1388923351-10556-2-git-send-email-akong@redhat.com> (raw)
In-Reply-To: <1388923351-10556-1-git-send-email-akong@redhat.com>

No need to re-append an expr list, it's ok to return schema.exprs

Signed-off-by: Amos Kong <akong@redhat.com>
---
 scripts/qapi.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/scripts/qapi.py b/scripts/qapi.py
index 750e9fb..4263bbd 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -165,8 +165,6 @@ def parse_schema(fp):
         print >>sys.stderr, e
         exit(1)
 
-    exprs = []
-
     for expr in schema.exprs:
         if expr.has_key('enum'):
             add_enum(expr['enum'])
@@ -175,9 +173,8 @@ def parse_schema(fp):
             add_enum('%sKind' % expr['union'])
         elif expr.has_key('type'):
             add_struct(expr)
-        exprs.append(expr)
 
-    return exprs
+    return schema.exprs
 
 def parse_args(typeinfo):
     if isinstance(typeinfo, basestring):
-- 
1.8.4.2

  reply	other threads:[~2014-01-05 12:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-05 12:02 [Qemu-devel] [PATCH v3 0/3] QMP full introspection Amos Kong
2014-01-05 12:02 ` Amos Kong [this message]
2014-01-05 12:02 ` [Qemu-devel] [PATCH v3 2/3] qapi: change qapi to convert schema json Amos Kong
2014-01-06  7:53   ` Fam Zheng
2014-01-06 10:11   ` Fam Zheng
2014-01-22 18:06   ` Luiz Capitulino
2014-01-23  3:05     ` Amos Kong
2014-01-23  3:25       ` Amos Kong
2014-01-23 13:30       ` Luiz Capitulino
2014-01-05 12:02 ` [Qemu-devel] [PATCH v3 3/3] qmp: full introspection support for QMP Amos Kong
2014-01-06  9:37   ` Fam Zheng
2014-01-09  9:49     ` Amos Kong
2014-01-22 18:18       ` Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388923351-10556-2-git-send-email-akong@redhat.com \
    --to=akong@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qiaonuohan@cn.fujitsu.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).