OSDN Git Service

eir: Use unsigned int for flags in struct eir_data
authorSzymon Janc <szymon.janc@tieto.com>
Fri, 21 Mar 2014 17:21:32 +0000 (18:21 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Sat, 22 Mar 2014 19:49:53 +0000 (21:49 +0200)
commit76b9efbadcd4ca66c8609ef24265d9c74070c3c4
tree3d4d9ad32614a01c7299a9c61692003b176861f0
parent0416bd086b743b74a2745dd4538a07184ee6ef2e
eir: Use unsigned int for flags in struct eir_data

This adds assumption that if flags field is not present in EIR all
flags are unset:
"The Flags data type shall be included when any of the Flag bits are
non-zero, otherwise the Flags data type may be omitted."

This also fix reporting non-discoverable LE devices as limited
discoverable due to no explicit check for flags == -1 as empty
flags.
src/eir.c
src/eir.h
unit/test-eir.c