From patchwork Tue Mar 26 07:12:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 1065254 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44T2R504Dwz9sSZ for ; Tue, 26 Mar 2019 18:13:21 +1100 (AEDT) Received: from localhost ([127.0.0.1]:54048 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8gGs-0001s3-T9 for incoming@patchwork.ozlabs.org; Tue, 26 Mar 2019 03:13:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8gGD-0001qm-Cy for qemu-devel@nongnu.org; Tue, 26 Mar 2019 03:12:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8gGC-0004Wc-E4 for qemu-devel@nongnu.org; Tue, 26 Mar 2019 03:12:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13813) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h8gGC-0004Vz-45 for qemu-devel@nongnu.org; Tue, 26 Mar 2019 03:12:36 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1CDA4307D923; Tue, 26 Mar 2019 07:12:35 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DE3847F48A; Tue, 26 Mar 2019 07:12:34 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 63E401132B74; Tue, 26 Mar 2019 08:12:33 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 26 Mar 2019 08:12:33 +0100 Message-Id: <20190326071233.1947-5-armbru@redhat.com> In-Reply-To: <20190326071233.1947-1-armbru@redhat.com> References: <20190326071233.1947-1-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Tue, 26 Mar 2019 07:12:35 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/4] qapi/qmp-dispatch: fix return value in do_qmp_dispatch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Vladimir Sementsov-Ogievskiy There are no harm but just looks weird to return bool in pointer-returning function. Introduced in 69240fe62d1 with the whole failure-checking "if" chunk. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20190325154748.66381-1-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/qmp-dispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 5f812bb9f2..e2c366e09e 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -111,7 +111,7 @@ static QObject *do_qmp_dispatch(QmpCommandList *cmds, QObject *request, if (oob && !(cmd->options & QCO_ALLOW_OOB)) { error_setg(errp, "The command %s does not support OOB", command); - return false; + return NULL; } if (runstate_check(RUN_STATE_PRECONFIG) &&