From nobody Sat May 4 09:35:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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=1573637568; cv=none; d=zoho.com; s=zohoarc; b=H00j/roXtuw4YSQxe1wpDjdxoC/19OeHIox/l4E0kBe7hEAPUkFij0cWVvVxOfcf6o4LwBDIbnOfSGeOB08PfiSlwPfNQHjUsy1pjTjMjqffjD1gV9hm/W/TZ3GKVtEMBvUDLkI1KlX3T2K5EwsjW3DSucvH8tnzs+GDwR9s354= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573637568; 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=ZlDT47mPkgzE2B6OdSfzTUSEOWXWvcYqTHH0WmnjnNU=; b=a5FFZtwC8l7W788NU/udb+sOv+brRnDLLLXpr/zG6JR3y3SjEaVBsnloa6lPjSxY6fURKSJDVb4Ncj2B1YSOnUmgWpMqVsRyS0yKHtVYxQwDZxTZ4qFNv53bW4sxxYuQUXavSfcuS4+gXm8a/VkEqLYF1CCLb+YdmKzNgS8pXHc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1573637568642755.0525056887868; Wed, 13 Nov 2019 01:32:48 -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-420-apbImAVFOrSraOsZvmplow-1; Wed, 13 Nov 2019 04:32:46 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5498618CA9AA; Wed, 13 Nov 2019 09:32:41 +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 220D84DA1D; Wed, 13 Nov 2019 09:32:41 +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 AF2C918089CF; Wed, 13 Nov 2019 09:32:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAD9WQVw026800 for ; Wed, 13 Nov 2019 04:32:26 -0500 Received: by smtp.corp.redhat.com (Postfix) id 70C684DA29; Wed, 13 Nov 2019 09:32:26 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.43.2.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF2154DA27 for ; Wed, 13 Nov 2019 09:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573637567; 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=ZlDT47mPkgzE2B6OdSfzTUSEOWXWvcYqTHH0WmnjnNU=; b=A/lCB1ulfw6XY80xNcXPqMg3HzwLTICUvsLMBNuHFYbYNdg4xxnwFEZHEl9rJtZHugUyen +xtjvLNMh7d+Jc8CBn6WTYchOd8Q03qHgglJxdIdAuUU/u4bNOPYboOENzX6z1hwAIOGeu Gxv1IX+w6tZ1B4y29ZPhWz2kr9Gb/oQ= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 13 Nov 2019 10:33:08 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] util: use g_vsnprintf 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.16 X-MC-Unique: apbImAVFOrSraOsZvmplow-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Instead of vsnprintf from gnulib, use g_vsnprintf from GLib. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa --- src/util/virerror.c | 4 ++-- src/util/virtypedparam.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/virerror.c b/src/util/virerror.c index 54cd5b64b9..bf79a8aec7 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -1288,7 +1288,7 @@ void virReportErrorHelper(int domcode, =20 if (fmt) { va_start(args, fmt); - vsnprintf(errorMessage, sizeof(errorMessage)-1, fmt, args); + g_vsnprintf(errorMessage, sizeof(errorMessage)-1, fmt, args); va_end(args); } else { errorMessage[0] =3D '\0'; @@ -1358,7 +1358,7 @@ void virReportSystemErrorFull(int domcode, int n; =20 va_start(args, fmt); - n =3D vsnprintf(msgDetailBuf, sizeof(msgDetailBuf), fmt, args); + n =3D g_vsnprintf(msgDetailBuf, sizeof(msgDetailBuf), fmt, args); va_end(args); =20 size_t len =3D strlen(errnoDetail); diff --git a/src/util/virtypedparam.c b/src/util/virtypedparam.c index 4ad2ed455f..603fcf213a 100644 --- a/src/util/virtypedparam.c +++ b/src/util/virtypedparam.c @@ -764,7 +764,7 @@ virTypedParamSetNameVPrintf(virTypedParameterPtr par, const char *fmt, va_list ap) { - if (vsnprintf(par->field, VIR_TYPED_PARAM_FIELD_LENGTH, fmt, ap) > VIR= _TYPED_PARAM_FIELD_LENGTH) { + if (g_vsnprintf(par->field, VIR_TYPED_PARAM_FIELD_LENGTH, fmt, ap) > V= IR_TYPED_PARAM_FIELD_LENGTH) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Field name too lon= g")); return -1; } --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Sat May 4 09:35:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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 (zoho.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=1573637573; cv=none; d=zoho.com; s=zohoarc; b=TQGPwcICTFcOSoUJzfgKKd0HVXwSjRJ2bS7R7FOxyAD6APMN8W3WJR4juNlSGysFQJ4INLHlOSWjxKLqTqlpNHmdXNRFu6Ergx0lU8QArpfm+W8GmZRCi2YNpJUEvStWCki9YMHioY8ELjbnr5he938n0Eg0khDhG/gamzUOI6o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573637573; 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=3Qsztzll5QP9miNiDR/kzdnruG4qRGctOtYxtbXUgNA=; b=GAWeaKhVPmlcEI9GbrFLtUsFBzunUE8Gi3a/blSC7m4AylWoldq/yDOYDdD6dp6pR9W2ID/OyzMrrx05VW3te9MXbCpKxRQsbNMjlFEmvyqUL2f8bTtv3SlR13T7SOq4cRwgvBImViBHt3qiShIVGpVZh835AeJncmxwALc55jI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.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-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1573637573179508.2364003435164; Wed, 13 Nov 2019 01:32:53 -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-33-02JE2wyUO7KUYW9KUfL32g-1; Wed, 13 Nov 2019 04:32:50 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 657258F11F5; Wed, 13 Nov 2019 09:32:45 +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 3BA426046B; Wed, 13 Nov 2019 09:32:45 +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 ECD094BB65; Wed, 13 Nov 2019 09:32:44 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAD9WRoB026808 for ; Wed, 13 Nov 2019 04:32:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3D4194DA29; Wed, 13 Nov 2019 09:32:27 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.43.2.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id BBFBC4DA27 for ; Wed, 13 Nov 2019 09:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573637572; 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=3Qsztzll5QP9miNiDR/kzdnruG4qRGctOtYxtbXUgNA=; b=Y2jSgQQ9gFgv9LZBzj6kaUvw3/Dj0HzLMMDv/OR2wM2ADondWARr/QpR63w1fojocJggu/ AlkgLwFqNZYOfC1PliwkS++I+IkIrhm9aO6zmWb0ssldbFSNEra8UfgIKfVjQoR7Bv7gVp XN+aa7fLCT/8NBv2a8qQOGh8QV+BFL4= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 13 Nov 2019 10:33:09 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] qemu: use GUINT32_SWAP_LE_BE 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.11 X-MC-Unique: 02JE2wyUO7KUYW9KUfL32g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use this GLib macro instead of bswap_32 from gnulib. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa --- src/qemu/qemu_driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c969a3d463..85b0c9cb79 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2803,11 +2803,11 @@ struct _virQEMUSaveData { static inline void bswap_header(virQEMUSaveHeaderPtr hdr) { - hdr->version =3D bswap_32(hdr->version); - hdr->data_len =3D bswap_32(hdr->data_len); - hdr->was_running =3D bswap_32(hdr->was_running); - hdr->compressed =3D bswap_32(hdr->compressed); - hdr->cookieOffset =3D bswap_32(hdr->cookieOffset); + hdr->version =3D GUINT32_SWAP_LE_BE(hdr->version); + hdr->data_len =3D GUINT32_SWAP_LE_BE(hdr->data_len); + hdr->was_running =3D GUINT32_SWAP_LE_BE(hdr->was_running); + hdr->compressed =3D GUINT32_SWAP_LE_BE(hdr->compressed); + hdr->cookieOffset =3D GUINT32_SWAP_LE_BE(hdr->cookieOffset); } =20 =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list