linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Gix, Brian" <brian.gix@intel.com>
To: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Stotland, Inga" <inga.stotland@intel.com>
Subject: Re: [PATCH BlueZ] mesh: Zero out config node struct before initializing
Date: Fri, 4 Dec 2020 18:11:47 +0000	[thread overview]
Message-ID: <6c3dd7e32c77ff7e9c09de90cb39d70fd0cf867d.camel@intel.com> (raw)
In-Reply-To: <20201202211151.148651-1-inga.stotland@intel.com>

Applied
On Wed, 2020-12-02 at 13:11 -0800, Inga Stotland wrote:
> This memsets all the fields of mesh_db_node to zero prior to intializing
> some fields in mesh_config_node struct and creating a brand new node
> configuration. Just a precaution against having uninitialized items.
> ---
>  mesh/node.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/mesh/node.c b/mesh/node.c
> index 35293e0f0..4bc11309b 100644
> --- a/mesh/node.c
> +++ b/mesh/node.c
> @@ -856,6 +856,8 @@ static void convert_node_to_storage(struct mesh_node *node,
>  {
>  	const struct l_queue_entry *entry;
>  
> +	memset(db_node, 0, sizeof(struct mesh_config_node));
> +
>  	db_node->cid = node->comp.cid;
>  	db_node->pid = node->comp.pid;
>  	db_node->vid = node->comp.vid;

      parent reply	other threads:[~2020-12-04 18:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 21:11 [PATCH BlueZ] mesh: Zero out config node struct before initializing Inga Stotland
2020-12-02 21:26 ` [BlueZ] " bluez.test.bot
2020-12-04 18:11 ` Gix, Brian [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=6c3dd7e32c77ff7e9c09de90cb39d70fd0cf867d.camel@intel.com \
    --to=brian.gix@intel.com \
    --cc=inga.stotland@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /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).