qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: bios-tables-test: replace memset with initializer


From: Thomas Huth
Subject: Re: [PATCH] tests: bios-tables-test: replace memset with initializer
Date: Thu, 30 Mar 2023 15:16:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 30/03/2023 15.11, Paolo Bonzini wrote:
Coverity complains that memset() writes over a const field.  Use
an initializer instead, so that the const field is left to zero.
Tests that have to write the const field already use an initializer
for the whole struct, here I am choosing the smallest possible
patch (which is not that small already).

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  tests/qtest/bios-tables-test.c | 123 ++++++++++++---------------------
  1 file changed, 43 insertions(+), 80 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]