From: "Stotland, Inga" <inga.stotland@intel.com>
To: "michal.lowas-rzechonek@silvair.com"
<michal.lowas-rzechonek@silvair.com>
Cc: "linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
"Gix, Brian" <brian.gix@intel.com>
Subject: Re: [PATCH BlueZ 2/4 v3] mesh: Fix virtual address processing
Date: Sun, 30 Jun 2019 06:42:16 +0000 [thread overview]
Message-ID: <3e78e37fa2fec9b047fc92154f66297886ef3642.camel@intel.com> (raw)
In-Reply-To: <20190629083434.edok7cdjwsjt4d7i@kynes>
[-- Attachment #1: Type: text/plain, Size: 806 bytes --]
Hi Michal,
On Sat, 2019-06-29 at 10:34 +0200, Michał Lowas-Rzechonek wrote:
> Hi Inga,
>
> On 06/28, Inga Stotland wrote:
> > +static struct mesh_virtual *add_virtual(const uint8_t *v)
> > +{
> > + struct mesh_virtual *virt = l_queue_find(mesh_virtuals,
> > + find_virt_by_label, v);
> > +
> > + if (virt) {
> > + virt->ref_cnt++;
> > + return virt;
> > + }
> > +
> > + virt = l_new(struct mesh_virtual, 1);
> > +
> > + if (!mesh_crypto_virtual_addr(v, &virt->addr)) {
> > + l_free(virt);
> > + return NULL;
> > + }
> > +
> > + memcpy(virt->label, v, 16);
> > + virt->ref_cnt++;
>
> I am aware that l_new zeroes the allocated object, but I think it
> would
> be clearer to say "virt->ref_cnt = 1" here.
>
I agree, this is better. Thanks for the review.
Inga
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3265 bytes --]
next prev parent reply other threads:[~2019-06-30 6:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 23:01 [PATCH BlueZ 0/4 v3] Model publication fixes Inga Stotland
2019-06-28 23:01 ` [PATCH BlueZ 1/4 v3] mesh: Clean up model.c and cfg-server.c Inga Stotland
2019-06-28 23:01 ` [PATCH BlueZ 2/4 v3] mesh: Fix virtual address processing Inga Stotland
2019-06-29 8:34 ` Michał Lowas-Rzechonek
2019-06-30 6:42 ` Stotland, Inga [this message]
2019-06-28 23:01 ` [PATCH BlueZ 3/4 v3] mesh: Fix and clean up model publication code Inga Stotland
2019-06-28 23:01 ` [PATCH BlueZ 4/4 v3] test: test-mesh - Correctly stop periodic publication Inga Stotland
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=3e78e37fa2fec9b047fc92154f66297886ef3642.camel@intel.com \
--to=inga.stotland@intel.com \
--cc=brian.gix@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=michal.lowas-rzechonek@silvair.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox