Bluetooth: Mesh: Health: Fix Current Status encoding

The Test ID was incorrectly being added as 4 bytes (size of a pointer)
instead of the intended 1 byte.

This fixes Coverity CID 173643.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-08-03 13:16:07 +03:00 committed by Johan Hedberg
commit f8c338fde8

View file

@ -86,7 +86,7 @@ static size_t health_get_current(struct bt_mesh_model *mod,
bt_mesh_model_msg_init(msg, OP_HEALTH_CURRENT_STATUS); bt_mesh_model_msg_init(msg, OP_HEALTH_CURRENT_STATUS);
test_id = net_buf_simple_add(msg, sizeof(test_id)); test_id = net_buf_simple_add(msg, 1);
company_ptr = net_buf_simple_add(msg, sizeof(company_id)); company_ptr = net_buf_simple_add(msg, sizeof(company_id));
fault_count = net_buf_simple_tailroom(msg) - 4; fault_count = net_buf_simple_tailroom(msg) - 4;