From nobody Mon Feb 9 14:17:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1671440655; cv=none; d=zohomail.com; s=zohoarc; b=KsUuWPwHLPw6OXAJWWmDpiKI7cG0H6ZF5NoxbfrOVAfLMfZtPZ++iOltNygE07BsLfty6vD0BmcklcB1+5dle4mOPH2+jN3mfYhwqkcWcchvPU4skv43bxxcqGzQL32a0E4C8KTNOfgHo8RXQXOVFqz3AmBrtBgjr44GRLNLTSk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1671440655; 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=EET+cPAy1BFJdnvOTetfC5y2yujxZcvveUfCJiqqxSk=; b=PIHwIcHDkLs6gfwi5JrphuH6XxigWyTI7biLiJRoRItt/HmsrYs03i8yFLYhYg1wT1FRuL9YcnEd0NxiN9R4ozWWNtlbSfL6jBbuWXw3R/tIrg4s8cRyppo287sooZ9I8OG04wD3GvueJ0slxSYoBsysn5uzOVoZiXhSIqNXfo4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1671440655476132.95336415491954; Mon, 19 Dec 2022 01:04:15 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-290-2rlqdM3hO0WTAHEgdpE0Pw-1; Mon, 19 Dec 2022 04:04:10 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4008B100F91E; Mon, 19 Dec 2022 09:04:07 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7A2E2166B2B; Mon, 19 Dec 2022 09:04:06 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 88F751946594; Mon, 19 Dec 2022 09:04:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5C0041946A6C for ; Mon, 19 Dec 2022 09:04:05 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 40F871121314; Mon, 19 Dec 2022 09:04:05 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF1AD1121315 for ; Mon, 19 Dec 2022 09:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671440653; 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=EET+cPAy1BFJdnvOTetfC5y2yujxZcvveUfCJiqqxSk=; b=gZ6pjvY0ef5rZQWjhhhfz1E+2J8oEJYLntcqVmVHVFPErq+eVMxMZnD5ZVo5tTsI6jWjm7 KI77Rv+JT7Hj+83620wMbRlRiLTAd49m7Xe/suDL8w7Yq5O7BFQgIFaUHNvxEHxXIC1zPk 9JRW+6Mhffu6pEZjXBV7zEUe/cRnG0U= X-MC-Unique: 2rlqdM3hO0WTAHEgdpE0Pw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/2] util: qemu: Remove 'skipKey' argument from virQEMUBuildCommandLineJSONArrayFormatFunc prototype Date: Mon, 19 Dec 2022 10:04:01 +0100 Message-Id: <0215cbf4b0f0313719da6a7b97f0f1d8433b0e91.1671440529.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1671440656828100001 Content-Type: text/plain; charset="utf-8" Since we really only need to handle key skipping in the top level object the caller doesn't at this point even pass it to the array formatting helper function. Remove the unused argument. Signed-off-by: Peter Krempa --- src/util/virqemu.c | 13 +++++-------- src/util/virqemu.h | 12 ++++-------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/util/virqemu.c b/src/util/virqemu.c index 15602e30db..b9e57a6f4c 100644 --- a/src/util/virqemu.c +++ b/src/util/virqemu.c @@ -53,8 +53,7 @@ virQEMUBuildCommandLineJSONRecurse(const char *key, int virQEMUBuildCommandLineJSONArrayBitmap(const char *key, virJSONValue *array, - virBuffer *buf, - const char *skipKey G_GNUC_UNUSED) + virBuffer *buf) { ssize_t pos =3D -1; ssize_t end; @@ -90,8 +89,7 @@ virQEMUBuildCommandLineJSONArrayBitmap(const char *key, int virQEMUBuildCommandLineJSONArrayNumbered(const char *key, virJSONValue *array, - virBuffer *buf, - const char *skipKey) + virBuffer *buf) { virJSONValue *member; size_t i; @@ -102,7 +100,7 @@ virQEMUBuildCommandLineJSONArrayNumbered(const char *ke= y, member =3D virJSONValueArrayGet((virJSONValue *) array, i); prefix =3D g_strdup_printf("%s.%zu", key, i); - if (virQEMUBuildCommandLineJSONRecurse(prefix, member, buf, skipKe= y, + if (virQEMUBuildCommandLineJSONRecurse(prefix, member, buf, NULL, virQEMUBuildCommandLineJSON= ArrayNumbered, true) < 0) return 0; @@ -127,8 +125,7 @@ virQEMUBuildCommandLineJSONArrayNumbered(const char *ke= y, int virQEMUBuildCommandLineJSONArrayObjectsStr(const char *key, virJSONValue *array, - virBuffer *buf, - const char *skipKey G_GNUC_UNUS= ED) + virBuffer *buf) { g_auto(virBuffer) tmp =3D VIR_BUFFER_INITIALIZER; size_t i; @@ -221,7 +218,7 @@ virQEMUBuildCommandLineJSONRecurse(const char *key, return -1; } - if (arrayFunc(key, value, buf, NULL) < 0) { + if (arrayFunc(key, value, buf) < 0) { /* fallback, treat the array as a non-bitmap, adding the key * for each member */ for (i =3D 0; i < virJSONValueArraySize(value); i++) { diff --git a/src/util/virqemu.h b/src/util/virqemu.h index 472f24de53..be083d7545 100644 --- a/src/util/virqemu.h +++ b/src/util/virqemu.h @@ -28,20 +28,16 @@ typedef int (*virQEMUBuildCommandLineJSONArrayFormatFunc)(const char *key, virJSONValue *ar= ray, - virBuffer *buf, - const char *skip= Key); + virBuffer *buf); int virQEMUBuildCommandLineJSONArrayObjectsStr(const char *key, virJSONValue *array, - virBuffer *buf, - const char *skipKey); + virBuffer *buf); int virQEMUBuildCommandLineJSONArrayBitmap(const char *key, virJSONValue *array, - virBuffer *buf, - const char *skipKey); + virBuffer *buf); int virQEMUBuildCommandLineJSONArrayNumbered(const char *key, virJSONValue *array, - virBuffer *buf, - const char *skipKey); + virBuffer *buf); int virQEMUBuildCommandLineJSON(virJSONValue *value, virBuffer *buf, --=20 2.38.1