From nobody Mon Feb 9 09:28:52 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=1689694377; cv=none; d=zohomail.com; s=zohoarc; b=gmhmj81Rq4hpvmdIi84rOOwe0KROuaLobuN9W50EKK3JrsDEoukRZ83FyKjdDU5uGzoUOFqYBYXuXuIqBWyM5ma2DwdoA4VgM+2PzdqtnWKdwfEGJqNQpQ+9flsPkjKZ+ThjnsZyHFNQVpJm90+7WvWfhr/bSF1vxwvBfzVY2uE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689694377; 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=d+EiGOt9jY5A4PM8jsaU1xMNRYgIyfqFc8nRS5+a9NU=; b=MmWp2u/kEMIUit4lxOLIZCSvjZkiV1ETOd+UGoAAS2bVot6/VL7SV3Id0w7DMI4fe59P7ApCc/YplyQm8IGbZsVr0lOcsduda5Dc/qdCgnNJdoVyD0R8ntY72PnRtkUO1nN05rRVyoTmfGQ5ZLkYiRxfBX+UU2XR9yzy6RMnQ34= 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 1689694377478823.1972152818106; Tue, 18 Jul 2023 08:32:57 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-156-xCbMcDehMBioekN6BHm4gA-1; Tue, 18 Jul 2023 11:32:48 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B94CC1C280B6; Tue, 18 Jul 2023 15:28:05 +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 A3D074087C62; Tue, 18 Jul 2023 15:28:05 +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 8723E194658F; Tue, 18 Jul 2023 15:28:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 434FA19465B6 for ; Tue, 18 Jul 2023 15:28:03 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 2D3DDF66D0; Tue, 18 Jul 2023 15:28:03 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id C898CF6CCA for ; Tue, 18 Jul 2023 15:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689694376; 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=d+EiGOt9jY5A4PM8jsaU1xMNRYgIyfqFc8nRS5+a9NU=; b=QK0x7cHOPnA10gej643hFl1dNdUpaIfv1OG58c5HHCkty0HgBO9k6r0MGvVcEvjhaAEjgo FZnlLBsrcDw4gxS/vPEPF5sWa0tfAM6/LV27mW8DbfVK4QjFN35OU/j/A85ZCruu/EwSsD 2dG8V0UHn38+rQueAsgYmoIir46uQ28= X-MC-Unique: xCbMcDehMBioekN6BHm4gA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 3/5] virrandom: Fix printf format string in virRandomGenerateWWN() Date: Tue, 18 Jul 2023 17:27:36 +0200 Message-ID: <873612408993649951648e010c2acbd258b803fe.1689693984.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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.2 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: 1689694377953100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Firstly, drop needless concatenation of two static strings. Secondly, use proper (portable) formatter for uint64_t so that typecast to ULL can be dropped. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/util/virrandom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/util/virrandom.c b/src/util/virrandom.c index 7606dd1684..38fcfbc6ba 100644 --- a/src/util/virrandom.c +++ b/src/util/virrandom.c @@ -160,8 +160,7 @@ virRandomGenerateWWN(char **wwn, return -1; } =20 - *wwn =3D g_strdup_printf("5" "%s%09llx", oui, - (unsigned long long)virRandomBits(36)); + *wwn =3D g_strdup_printf("5%s%09" PRIx64, oui, virRandomBits(36)); return 0; } =20 --=20 2.41.0