Re: [PATCH v3 02/18] eir: Add support for parsing SSP hash and randomizer

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

 



On Monday 24 of September 2012 11:08:45 Johan Hedberg wrote:
> Hi Szymon,

Hi Johan,
 
> On Fri, Sep 21, 2012, Szymon Janc wrote:
> > +		case EIR_SSP_HASH:
> > +			if (data_len < 16)
> > +				break;
> > +			eir->hash = g_malloc(16);
> > +			memcpy(eir->hash, data, 16);
> > +			break;
> > +
> > +		case EIR_SSP_RANDOMIZER:
> > +			if (data_len < 16)
> > +				break;
> > +			eir->randomizer = g_malloc(16);
> > +			memcpy(eir->randomizer, data, 16);
> > +			break;
> 
> I suppose using g_memdup would be simpler than g_malloc + memcpy.

Yeap that looks simpler, will use g_memdup in next version.


-- 
BR
Szymon Janc
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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