From nobody Thu Nov 13 23:39:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1583253388; cv=none; d=zohomail.com; s=zohoarc; b=e/kJkfky2jBAdT3pv4QVsIelv3UlOv+hLYkap6syTx2mBe5zdLKbgSeVSb+HxCOJcXMc9e7ggaVdBu1ImfwFgsQthhAQtWlGJ6t+2xzx094MDOqlcyjFHkJYuJIJfR54bliAm1/SsCnc0R4u3sU58W1HHeB8VUeOB7qSEFpdJZs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583253388; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=MOc7HeT+1s334JGeFcRwNRegWa0ts+HD+BGwpDGZNUc=; b=aciWhhIVWAKgTTOosDwbdX4Fs/RcK+k2mchtJ7MPW0Yik62Xzd9hulJTkkl+bznsa4XboPT+JULHcEmux/G34KwJyMdP74e3bjJW9w75nKDzAAuqchx6sfCyLrRNeAgpIE1+BoL/5uIk3E435/Epzy5TV7khJvssPQAJdnj8zGY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1583253388192496.9265662069738; Tue, 3 Mar 2020 08:36:28 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-451-mUSA-FLVM_iUuqrVPqNCkQ-1; Tue, 03 Mar 2020 11:36:24 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D1A5A800D48; Tue, 3 Mar 2020 16:36:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A632C10013A1; Tue, 3 Mar 2020 16:36:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 587B086A21; Tue, 3 Mar 2020 16:36:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 023GZG2Q001331 for ; Tue, 3 Mar 2020 11:35:16 -0500 Received: by smtp.corp.redhat.com (Postfix) id DAAAC100EBA4; Tue, 3 Mar 2020 16:35:16 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-129.ams2.redhat.com [10.36.116.129]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C16271000322; Tue, 3 Mar 2020 16:35:14 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 0C0F2113294C; Tue, 3 Mar 2020 17:35:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583253386; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=MOc7HeT+1s334JGeFcRwNRegWa0ts+HD+BGwpDGZNUc=; b=erMpV/xXltyakRx+cg88kvZYfiZ3a2XTq+3LqzFK2n+0RUj6WRCe6pRW2a+vNlva9ACV06 YQ3s9ZpjcWddWO38wmT0PuQsl5x/fbPqkD6dpvEWLjMPKVOGPj4A5qJjd/qwr8KvgD3mAn JzjP949MmdB4WcbtqAEb1IiK4ozoeso= X-MC-Unique: mUSA-FLVM_iUuqrVPqNCkQ-1 From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH v2 24/30] qapi: Replace qmp_dispatch()'s TODO comment by an explanation Date: Tue, 3 Mar 2020 17:34:59 +0100 Message-Id: <20200303163505.32041-25-armbru@redhat.com> In-Reply-To: <20200303163505.32041-1-armbru@redhat.com> References: <20200303163505.32041-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Markus Armbruster --- qapi/qmp-dispatch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 112d29a9ab..fb53687ce9 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -164,7 +164,11 @@ QDict *qmp_dispatch(QmpCommandList *cmds, QObject *req= uest, g_assert(!ret); return NULL; } else if (!ret) { - /* TODO turn into assertion */ + /* + * When the command's schema has no 'returns', cmd->fn() + * leaves @ret null. The QMP spec calls for an the empty + * object then; supply it. + */ ret =3D QOBJECT(qdict_new()); } =20 --=20 2.21.1