qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Cédric Le Goater" <clg@redhat.com>, qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Denis V . Lunev" <den@openvz.org>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>, "Stefan Weil" <sw@weilnetz.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Maciej S . Szmigiero" <maciej.szmigiero@oracle.com>,
	"Fam Zheng" <fam@euphon.net>,
	"Juan Quintela" <quintela@redhat.com>,
	"Peter Xu" <peterx@redhat.com>, "Fabiano Rosas" <farosas@suse.de>,
	"Leonardo Bras" <leobras@redhat.com>
Subject: Re: [PATCH v2 3/3] util/uuid: Remove UUID_FMT_LEN
Date: Thu, 26 Oct 2023 09:18:58 +0200	[thread overview]
Message-ID: <aa5e542d-097a-e101-f874-3b550ba8599b@linaro.org> (raw)
In-Reply-To: <20231026070636.1165037-4-clg@redhat.com>

On 26/10/23 09:06, Cédric Le Goater wrote:
> Dangerous and now unused.
> 
> Cc: Fam Zheng <fam@euphon.net>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
>   include/qemu/uuid.h | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/include/qemu/uuid.h b/include/qemu/uuid.h
> index 4e7afaf1d5bd5d382fefbd6f6275d69cf25e7483..356efe7b5797911640ed347fc08f4ef5ebbd0476 100644
> --- a/include/qemu/uuid.h
> +++ b/include/qemu/uuid.h
> @@ -78,8 +78,7 @@ typedef struct {
>                    "%02hhx%02hhx-" \
>                    "%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
>   
> -#define UUID_FMT_LEN 36
> -#define UUID_STR_LEN (UUID_FMT_LEN + 1)
> +#define UUID_STR_LEN (36 + 1)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>   
>   #define UUID_NONE "00000000-0000-0000-0000-000000000000"

but just noticing that ^^^ :) So I'd go with:

   QEMU_BUILD_BUG_ON(sizeof(UUID_NONE) - 1 != 36);
   #define UUID_STR_LEN sizeof(UUID_NONE)


  reply	other threads:[~2023-10-26  7:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26  7:06 [PATCH v2 0/3] vfio/pci: Fix buffer overrun when writing the VF token Cédric Le Goater
2023-10-26  7:06 ` [PATCH v2 1/3] util/uuid: Add UUID_STR_LEN definition Cédric Le Goater
2023-10-26  7:06 ` [PATCH v2 2/3] vfio/pci: Fix buffer overrun when writing the VF token Cédric Le Goater
2023-10-26 11:28   ` Peter Maydell
2023-10-26 13:33     ` Cédric Le Goater
2023-10-26  7:06 ` [PATCH v2 3/3] util/uuid: Remove UUID_FMT_LEN Cédric Le Goater
2023-10-26  7:18   ` Philippe Mathieu-Daudé [this message]
2023-10-26 10:57   ` Juan Quintela
2023-10-26  8:41 ` [PATCH v2 0/3] vfio/pci: Fix buffer overrun when writing the VF token Denis V. Lunev
2023-10-26  9:58   ` Cédric Le Goater
2023-10-26 13:42   ` Konstantin Ryabitsev
2023-10-26 15:36     ` Peter Maydell
2023-10-26 14:00 ` Cédric Le Goater
2023-10-27  5:01   ` Philippe Mathieu-Daudé
2023-10-30  8:59   ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa5e542d-097a-e101-f874-3b550ba8599b@linaro.org \
    --to=philmd@linaro.org \
    --cc=berrange@redhat.com \
    --cc=clg@redhat.com \
    --cc=den@openvz.org \
    --cc=eduardo@habkost.net \
    --cc=fam@euphon.net \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=leobras@redhat.com \
    --cc=maciej.szmigiero@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).