From nobody Mon Feb 9 01:22:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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=1606762630; cv=none; d=zohomail.com; s=zohoarc; b=VA+3YvwATlk1Y5oHTfDl7lZc4sZUgOvVjmsQTaen/tSm+F18HBKEJ6WIhdW00CkYjij0QXgz68OrSdAr5d2r+/ULwEO3VEHlHIno+VSGmP3b495P7XmMSD5dOuxmdGWw3mIalHSl1xIDSFvpcEDS1mIrW8Pi0NPbp8rm+8U8/QY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606762630; h=Content-Type:Content-Transfer-Encoding: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=qkKGmqOE04XPJEMu01uxQT0yRseUUFgcyYGPc6VO0JE=; b=IhmO6OqKMnewrTOxE3TskPnIlTJCPFUbjgVMEDru1b3ZpdBuNWdhTCMjhk48OrT03vNsNbZrbew9Hzdi+YGKOkwNDVGdRiEEP6tNlqsUBmnUPZm2R9GItzDHaUS3JxQkfRX2Emrh8fdc9QnpzCLmivhIWgZcI1XQnIsN1fy9sm4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1606762630736323.8815895371133; Mon, 30 Nov 2020 10:57:10 -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-148-AiErJNixOF-M-m2Df3chXA-1; Mon, 30 Nov 2020 13:56:12 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5556B1005E54; Mon, 30 Nov 2020 18:56:02 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 299E65D6AB; Mon, 30 Nov 2020 18:56:02 +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 E042F1809CA2; Mon, 30 Nov 2020 18:56:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AUItmMD014200 for ; Mon, 30 Nov 2020 13:55:48 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9A41660BE2; Mon, 30 Nov 2020 18:55:48 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 936D260C67 for ; Mon, 30 Nov 2020 18:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606762629; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=qkKGmqOE04XPJEMu01uxQT0yRseUUFgcyYGPc6VO0JE=; b=FB8tzBz1dGnJHUOb6RVKr4jvoXDDRgOTqbfvgIovJ/ZYV8h4pRI1sTTK6Uvs1355oz/otc yLzNZP7kuqgKpiyTSYedT3IcDVe2sbvmD5xGoQ6hOnDOa3bIgegaZfkbmGomyUcT4L3jp5 zhvdBnOKSXI2CCpMtti+nsR75RlzEwI= X-MC-Unique: AiErJNixOF-M-m2Df3chXA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/24] qemuMonitorJSONAddObject: Take double pointer for @props Date: Mon, 30 Nov 2020 19:55:18 +0100 Message-Id: <8e724018dfce9da4fd51473b4e1d455774099086.1606762033.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: 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.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" Prepare for a refactor of qemuMonitorJSONMakeCommandInternal. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 3 +-- src/qemu/qemu_monitor_json.c | 5 +++-- src/qemu/qemu_monitor_json.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index b29779f8e4..7f58c16987 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -3104,8 +3104,7 @@ qemuMonitorAddObject(qemuMonitorPtr mon, if (alias) tmp =3D g_strdup(id); - ret =3D qemuMonitorJSONAddObject(mon, *props); - *props =3D NULL; + ret =3D qemuMonitorJSONAddObject(mon, props); if (alias) *alias =3D g_steal_pointer(&tmp); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 8fd53a565d..fbcd1d8e08 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -4633,12 +4633,13 @@ qemuMonitorJSONAddDevice(qemuMonitorPtr mon, int qemuMonitorJSONAddObject(qemuMonitorPtr mon, - virJSONValuePtr props) + virJSONValuePtr *props) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; + virJSONValuePtr pr =3D g_steal_pointer(props); - if (!(cmd =3D qemuMonitorJSONMakeCommandInternal("object-add", props))) + if (!(cmd =3D qemuMonitorJSONMakeCommandInternal("object-add", pr))) return -1; if (qemuMonitorJSONCommand(mon, cmd, &reply) < 0) diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 9cb4ec264b..d123c38812 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -246,7 +246,7 @@ int qemuMonitorJSONDelDevice(qemuMonitorPtr mon, const char *devalias); int qemuMonitorJSONAddObject(qemuMonitorPtr mon, - virJSONValuePtr props); + virJSONValuePtr *props); int qemuMonitorJSONDelObject(qemuMonitorPtr mon, const char *objalias, --=20 2.28.0