qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH v3 07/14] qapi: Drop redundant, unclean error_is_set()
Date: Fri,  2 May 2014 13:26:35 +0200	[thread overview]
Message-ID: <1399030002-27222-8-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1399030002-27222-1-git-send-email-armbru@redhat.com>

do_qmp_dispatch()'s test for qmp_dispatch_check_obj() failure examines
both the return value and the error object.  The latter part is
unclean; it works only when do_qmp_dispatch()'s caller passes a
non-null errp argument.  That's the case, but it's not locally
obvious.  Unclean.

Cleanup would be easy enough, but since the unclean code is also
redundant, let's just drop it.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 qapi/qmp-dispatch.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 141a376..187af56 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -67,9 +67,8 @@ static QObject *do_qmp_dispatch(QObject *request, Error **errp)
     QmpCommand *cmd;
     QObject *ret = NULL;
 
-
     dict = qmp_dispatch_check_obj(request, errp);
-    if (!dict || error_is_set(errp)) {
+    if (!dict) {
         return NULL;
     }
 
-- 
1.8.1.4

  parent reply	other threads:[~2014-05-02 11:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 11:26 [Qemu-devel] [PATCH v3 00/14] qmp qga: Purge error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 01/14] qmp hmp: Consistently name Error * objects err, and not errp Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 02/14] qga: Consistently name Error ** objects errp, and not err Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 03/14] qmp: " Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 04/14] error: " Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 05/14] qga: Use return values instead of error_is_set(errp) Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 06/14] hmp: Guard against misuse of hmp_handle_error() Markus Armbruster
2014-05-02 11:26 ` Markus Armbruster [this message]
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 08/14] tests/qapi-schema: Drop superfluous error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 09/14] qapi: Clean up fragile use of error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 10/14] qga: " Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 11/14] qga: Drop superfluous error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 12/14] qemu-option: Clean up fragile use of error_is_set() Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 13/14] dump: Drop pointless error_is_set(), DumpState member errp Markus Armbruster
2014-05-02 11:26 ` [Qemu-devel] [PATCH v3 14/14] qmp: Don't use error_is_set() to suppress additional errors Markus Armbruster
2014-05-02 12:34   ` Eric Blake
2014-05-07  6:08     ` Markus Armbruster
2014-05-07 14:08       ` Luiz Capitulino
2014-05-07 15:54         ` Markus Armbruster
2014-05-02 12:32 ` [Qemu-devel] [PATCH v3 00/14] qmp qga: Purge error_is_set() Eric Blake
2014-05-07 14:30 ` Luiz Capitulino
2014-05-07 16:00   ` Markus Armbruster

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=1399030002-27222-8-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).