All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>, qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, Stefan Berger <stefanb@linux.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] tpm: Zero-init structure to avoid uninitialized variables in valgrind log
Date: Thu, 25 Oct 2018 00:43:46 +0200	[thread overview]
Message-ID: <d694d457-4871-b3ed-ec1e-be555cacfbf5@redhat.com> (raw)
In-Reply-To: <20181024191458.1277823-1-stefanb@linux.vnet.ibm.com>

On 24/10/18 21:14, Stefan Berger wrote:
> Zero-init the ptm_loc structure so that we don't have fields that
> are not initialised.
> 
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>   hw/tpm/tpm_emulator.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c
> index 10bc20dbec..968f06ae3b 100644
> --- a/hw/tpm/tpm_emulator.c
> +++ b/hw/tpm/tpm_emulator.c
> @@ -158,7 +158,7 @@ static int tpm_emulator_unix_tx_bufs(TPMEmulator *tpm_emu,
>   static int tpm_emulator_set_locality(TPMEmulator *tpm_emu, uint8_t locty_number,
>                                        Error **errp)
>   {
> -    ptm_loc loc;
> +    ptm_loc loc = { 0 };
>   
>       if (tpm_emu->cur_locty_number == locty_number) {
>           return 0;
> 

      reply	other threads:[~2018-10-24 22:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-24 19:14 [Qemu-devel] [PATCH] tpm: Zero-init structure to avoid uninitialized variables in valgrind log Stefan Berger
2018-10-24 22:43 ` Philippe Mathieu-Daudé [this message]

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=d694d457-4871-b3ed-ec1e-be555cacfbf5@redhat.com \
    --to=philmd@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.ibm.com \
    --cc=stefanb@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.