diff options
author | Szymon Janc <szymon.janc@tieto.com> | 2012-10-03 15:18:16 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-10-03 22:40:28 +0300 |
commit | 1748b9e5490ccb237efb36a8bcc7e44584c87024 (patch) | |
tree | 204e531b03919ac622d10193286d8a437fac2b8f /src/eir.c | |
parent | 7814825978fbe037d5872017e0d4c0dff534a476 (diff) | |
download | bluez-1748b9e5490ccb237efb36a8bcc7e44584c87024.tar.gz |
eir: Store class in struct eir_data as uint32_t
This simplify code as class is stored on storage as uint32_t and
had to be converted to it in few places.
Diffstat (limited to 'src/eir.c')
-rw-r--r-- | src/eir.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -166,7 +166,8 @@ int eir_parse(struct eir_data *eir, uint8_t *eir_data, uint8_t eir_len) case EIR_CLASS_OF_DEV: if (data_len < 3) break; - memcpy(eir->dev_class, data, 3); + eir->class = data[0] | (data[1] << 8) | + (data[2] << 16); break; case EIR_GAP_APPEARANCE: |