Re: [PATCH BlueZ v2] mesh: Use node uuids as storage directory names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
Silvair http://silvair.com
Jasnogórska 44, 31-358 Krakow, POLAND



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux