Bluetooth: Use smallest possible size for enums
Use __packed so that enums consume the smallest possible size (in our case the same as uint8_t). Change-Id: I0440113e88a24509f406375d99173ddb54890925 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
3c47e9515c
commit
8bf880a388
2 changed files with 2 additions and 2 deletions
|
@ -169,7 +169,7 @@ struct bt_conn *bt_conn_create_le(const bt_addr_le_t *peer,
|
|||
#endif
|
||||
|
||||
/** Security level. */
|
||||
typedef enum {
|
||||
typedef enum __packed {
|
||||
BT_SECURITY_LOW, /** No encryption and no authentication. */
|
||||
BT_SECURITY_MEDIUM, /** encryption and no authentication (no MITM). */
|
||||
BT_SECURITY_HIGH, /** encryption and authentication (MITM). */
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
typedef enum {
|
||||
typedef enum __packed {
|
||||
BT_CONN_DISCONNECTED,
|
||||
BT_CONN_CONNECT_SCAN,
|
||||
BT_CONN_CONNECT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue