From: "michal.lowas-rzechonek@silvair.com" <michal.lowas-rzechonek@silvair.com>
To: Denis Kenzior <denkenz@gmail.com>
Cc: "Gix, Brian" <brian.gix@intel.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>,
"Stotland, Inga" <inga.stotland@intel.com>
Subject: Re: [PATCH BlueZ v2] mesh: Use node uuids as storage directory names
Date: Wed, 8 May 2019 06:39:01 +0200 [thread overview]
Message-ID: <20190508043901.bcueazjay3nm6cya@kynes> (raw)
In-Reply-To: <18e096c6-3b22-0096-5cb2-bef7264dbefe@gmail.com>
Hi Denis, Brian,
On 05/07, Denis Kenzior wrote:
> > > + 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...
> ;)
Will do, thanks for the tip!
Incidentally, are you aware why 'main' bluez aims to drop glib?
cheers
--
Michał Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND
next prev parent reply other threads:[~2019-05-08 4:39 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
2019-05-08 4:39 ` michal.lowas-rzechonek [this message]
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=20190508043901.bcueazjay3nm6cya@kynes \
--to=michal.lowas-rzechonek@silvair.com \
--cc=brian.gix@intel.com \
--cc=denkenz@gmail.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).