nrf/bluetooth: Resolve compilation warning in ble_drv.c.

This patch makes sure that the char_data.props is first
assigned a value before other flags are OR'd in.
Resolves compilation warning on possible unitialized variable.
This commit is contained in:
Glenn Ruben Bakke 2019-02-19 20:51:33 +01:00
parent 0c6f5bc529
commit ca2bb66127
1 changed files with 1 additions and 1 deletions

View File

@ -1088,7 +1088,7 @@ static void ble_evt_handler(ble_evt_t * p_ble_evt) {
char_data.decl_handle = p_char->handle_decl;
char_data.value_handle = p_char->handle_value;
char_data.props |= (p_char->char_props.broadcast) ? UBLUEPY_PROP_BROADCAST : 0;
char_data.props = (p_char->char_props.broadcast) ? UBLUEPY_PROP_BROADCAST : 0;
char_data.props |= (p_char->char_props.read) ? UBLUEPY_PROP_READ : 0;
char_data.props |= (p_char->char_props.write_wo_resp) ? UBLUEPY_PROP_WRITE_WO_RESP : 0;
char_data.props |= (p_char->char_props.write) ? UBLUEPY_PROP_WRITE : 0;