From: Denis Kenzior <denkenz@gmail.com>
To: "Gix, Brian" <brian.gix@intel.com>,
"michal.lowas-rzechonek@silvair.com"
<michal.lowas-rzechonek@silvair.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Cc: "Stotland, Inga" <inga.stotland@intel.com>
Subject: Re: [PATCH BlueZ v2] mesh: Use node uuids as storage directory names
Date: Tue, 7 May 2019 15:55:50 -0500 [thread overview]
Message-ID: <18e096c6-3b22-0096-5cb2-bef7264dbefe@gmail.com> (raw)
In-Reply-To: <1557261666.31289.11.camel@intel.com>
Hi Brian,
On 05/07/2019 03:41 PM, Gix, Brian wrote:
<snip>
>> + if (asprintf(&cfg, "%s/%s/node.json", dir_name,
>> + entry->d_name) < 0)
>> + continue;
>
> With ELL, we do not use asprintf. Every dynamic allocation must map back to l_malloc, which performs an
> abort() if a memory allocation fails. So this should be re-coded as a malloc of the desired size, and then use
> snprintf, using the malloc'd length as N.
>
...or use l_strdup_printf. Which is actually asprintf underneath... ;)
Regards,
-Denis
next prev parent reply other threads:[~2019-05-07 20:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 7:13 [PATCH BlueZ v2] mesh: Use node uuids as storage directory names Michał Lowas-Rzechonek
2019-05-07 18:14 ` Stotland, Inga
2019-05-07 20:41 ` Gix, Brian
2019-05-07 20:55 ` Denis Kenzior [this message]
2019-05-08 4:39 ` michal.lowas-rzechonek
2019-05-08 14:23 ` Gix, Brian
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=18e096c6-3b22-0096-5cb2-bef7264dbefe@gmail.com \
--to=denkenz@gmail.com \
--cc=brian.gix@intel.com \
--cc=inga.stotland@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;
as well as URLs for NNTP newsgroup(s).