[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 02/12] uuid: Make null_uuid static
From: |
Jeff Cody |
Subject: |
Re: [Qemu-devel] [PATCH v8 02/12] uuid: Make null_uuid static |
Date: |
Sun, 18 Sep 2016 23:31:04 -0400 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Sun, Sep 18, 2016 at 12:25:22PM +0800, Fam Zheng wrote:
> So that it doesn't have to be zeroed at each call.
>
> Suggested-by: Eric Blake <address@hidden>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> util/uuid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/util/uuid.c b/util/uuid.c
> index 6815904..f0c1eeb 100644
> --- a/util/uuid.c
> +++ b/util/uuid.c
> @@ -40,7 +40,7 @@ void qemu_uuid_generate(QemuUUID *uuid)
>
> int qemu_uuid_is_null(const QemuUUID *uu)
> {
> - QemuUUID null_uuid = { 0 };
> + static QemuUUID null_uuid;
> return memcmp(uu, &null_uuid, sizeof(QemuUUID)) == 0;
> }
>
> --
> 2.7.4
>
Reviewed-by: Jeff Cody <address@hidden>
- [Qemu-devel] [PATCH v8 00/12] UUID clean ups for 2.8, Fam Zheng, 2016/09/18
- [Qemu-devel] [PATCH v8 02/12] uuid: Make null_uuid static, Fam Zheng, 2016/09/18
- Re: [Qemu-devel] [PATCH v8 02/12] uuid: Make null_uuid static,
Jeff Cody <=
- [Qemu-devel] [PATCH v8 01/12] util: Add UUID API, Fam Zheng, 2016/09/18
- [Qemu-devel] [PATCH v8 03/12] vhdx: Use QEMU UUID API, Fam Zheng, 2016/09/18
- [Qemu-devel] [PATCH v8 04/12] vdi: Use QEMU UUID API, Fam Zheng, 2016/09/18
- [Qemu-devel] [PATCH v8 05/12] vpc: Use QEMU UUID API, Fam Zheng, 2016/09/18
- [Qemu-devel] [PATCH v8 06/12] crypto: Switch to QEMU UUID API, Fam Zheng, 2016/09/18