Thread (25 messages) flat view 25 messages, 2 authors, 2012-09-24

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

From: Szymon Janc <hidden>
Date: 2012-09-24 10:20:20

On Monday 24 of September 2012 11:08:45 Johan Hedberg wrote:
Hi Szymon,
Hi Johan,
 
On Fri, Sep 21, 2012, Szymon Janc wrote:
quoted
+		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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help