apache-mynewt-bot removed a comment on pull request #773: URL: https://github.com/apache/mynewt-nimble/pull/773#issuecomment-644066487
<!-- style-bot --> ## Style check summary ### Our coding style is [here!](https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md) #### nimble/host/src/ble_eatt.c <details> ```diff @@ -52,7 +52,7 @@ #define BLE_EATT_DATABUF_SIZE ( \ MYNEWT_VAL(BLE_EATT_MTU) + \ - 2 +\ + 2 + \ sizeof (struct os_mbuf_pkthdr) + \ sizeof (struct os_mbuf)) @@ -352,7 +352,7 @@ uint8_t supported_features; int rc; - if (error == NULL || (error->status != 0 && error->status != BLE_HS_EDONE)) { + if (error == NULL || (error->status != 0 && error->status != BLE_HS_EDONE)) { BLE_EATT_LOG_DEBUG("eatt: Cannot find Server Supported features on peer device\n"); return BLE_HS_EDONE; } ``` </details> #### nimble/host/src/ble_att.c <details> ```diff @@ -624,7 +624,7 @@ bool ble_att_is_request_op(uint8_t opcode) { - switch(opcode) { + switch (opcode) { case BLE_ATT_OP_MTU_REQ: case BLE_ATT_OP_FIND_INFO_REQ: case BLE_ATT_OP_FIND_TYPE_VALUE_REQ: @@ -645,8 +645,9 @@ } bool -ble_att_is_response_op(uint8_t opcode) { - switch(opcode) { +ble_att_is_response_op(uint8_t opcode) +{ + switch (opcode) { case BLE_ATT_OP_MTU_RSP: case BLE_ATT_OP_ERROR_RSP: case BLE_ATT_OP_FIND_INFO_RSP: ``` </details> #### nimble/host/src/ble_att_clt.c <details> ```diff @@ -27,8 +27,8 @@ #include "ble_hs_priv.h" /***************************************************************************** - * $error response * - *****************************************************************************/ +* $error response * +*****************************************************************************/ int ble_att_clt_rx_error(uint16_t conn_handle, uint16_t cid, struct os_mbuf **rxom) @@ -147,8 +147,8 @@ } /***************************************************************************** - * $find information * - *****************************************************************************/ +* $find information * +*****************************************************************************/ int ble_att_clt_tx_find_info(uint16_t conn_handle, uint16_t cid, uint16_t start_handle, @@ -355,8 +354,8 @@ } /***************************************************************************** - * $read by type * - *****************************************************************************/ +* $read by type * +*****************************************************************************/ int ble_att_clt_tx_read_type(uint16_t conn_handle, uint16_t cid, uint16_t start_handle, @@ -442,8 +441,8 @@ } /***************************************************************************** - * $read * - *****************************************************************************/ +* $read * +*****************************************************************************/ int ble_att_clt_tx_read(uint16_t conn_handle, uint16_t cid, uint16_t handle) @@ -488,8 +487,8 @@ } /***************************************************************************** - * $read blob * - *****************************************************************************/ +* $read blob * +*****************************************************************************/ int ble_att_clt_tx_read_blob(uint16_t conn_handle, uint16_t cid, uint16_t handle, uint16_t offset) @@ -535,8 +534,8 @@ } /***************************************************************************** - * $read multiple * - *****************************************************************************/ +* $read multiple * +*****************************************************************************/ int ble_att_clt_tx_read_mult(uint16_t conn_handle, uint16_t cid, const uint16_t *handles, int num_handles, bool variable) @@ -595,8 +594,8 @@ } /***************************************************************************** - * $read by group type * - *****************************************************************************/ +* $read by group type * +*****************************************************************************/ int ble_att_clt_tx_read_group_type(uint16_t conn_handle, uint16_t cid, @@ -693,8 +691,8 @@ } /***************************************************************************** - * $write * - *****************************************************************************/ +* $write * +*****************************************************************************/ int ble_att_clt_tx_write_req(uint16_t conn_handle, uint16_t cid, uint16_t handle, @@ -769,8 +767,8 @@ } /***************************************************************************** - * $prepare write request * - *****************************************************************************/ +* $prepare write request * +*****************************************************************************/ int ble_att_clt_tx_prep_write(uint16_t conn_handle, uint16_t cid, uint16_t handle, @@ -852,8 +850,8 @@ } /***************************************************************************** - * $execute write request * - *****************************************************************************/ +* $execute write request * +*****************************************************************************/ int ble_att_clt_tx_exec_write(uint16_t conn_handle, uint16_t cid, uint8_t flags) @@ -933,8 +931,8 @@ } /***************************************************************************** - * $handle value indication * - *****************************************************************************/ +* $handle value indication * +*****************************************************************************/ int ble_att_clt_tx_indicate(uint16_t conn_handle, uint16_t cid, ``` </details> #### nimble/host/src/ble_gattc.c <details> ```diff @@ -723,9 +723,9 @@ } #if MYNEWT_VAL(BLE_EATT_CHAN_NUM) > 0 - if (proc->cid != BLE_L2CAP_CID_ATT) { - ble_eatt_release_chan(proc->conn_handle, proc->op); - } + if (proc->cid != BLE_L2CAP_CID_ATT) { + ble_eatt_release_chan(proc->conn_handle, proc->op); + } #endif #if MYNEWT_VAL(BLE_HS_DEBUG) ``` </details> #### nimble/host/test/src/ble_att_svr_test.c <details> ```diff @@ -1204,31 +1200,34 @@ TEST_ASSERT(rc == 0); ble_hs_test_util_verify_tx_find_info_rsp( ((struct ble_hs_test_util_att_info_entry[]) { { - .handle = handle1, - .uuid = BLE_UUID128_DECLARE(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), - }, { - .handle = handle2, - .uuid = BLE_UUID128_DECLARE(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), - }, { - .handle = 0, - } })); + .handle = handle1, + .uuid = + BLE_UUID128_DECLARE(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14, + 15), + }, { + .handle = handle2, + .uuid = + BLE_UUID128_DECLARE(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, + 16), + }, { + .handle = 0, + } })); /*** Remaining 16-bit entry requested. */ rc = ble_hs_test_util_rx_att_find_info_req(conn_handle, BLE_L2CAP_CID_ATT, handle3, handle3); TEST_ASSERT(rc == 0); ble_hs_test_util_verify_tx_find_info_rsp( ((struct ble_hs_test_util_att_info_entry[]) { { - .handle = handle3, - .uuid = BLE_UUID16_DECLARE(0x000f), - }, { - .handle = 0, - } })); + .handle = handle3, + .uuid = BLE_UUID16_DECLARE(0x000f), + }, { + .handle = 0, + } })); ble_att_svr_test_assert_mbufs_freed(); } -TEST_CASE_SELF(ble_att_svr_test_find_type_value) -{ +TEST_CASE_SELF(ble_att_svr_test_find_type_value) { uint16_t conn_handle; uint16_t handle1; uint16_t handle2; ``` </details> #### nimble/host/test/src/ble_gatt_find_s_test.c <details> ```diff @@ -250,103 +249,113 @@ } } -TEST_CASE_SELF(ble_gatt_find_s_test_1) -{ +TEST_CASE_SELF(ble_gatt_find_s_test_1) { /* Two 16-bit UUID services; one response. */ ble_gatt_find_s_test_misc_init(); - ble_hs_test_util_create_conn(2, ((uint8_t[]){2,3,4,5,6,7,8,9}), + ble_hs_test_util_create_conn(2, ((uint8_t[]) {2,3,4,5,6,7,8,9}), NULL, NULL); ble_gatt_find_s_test_misc_find_inc(2, BLE_L2CAP_CID_ATT, 5, 10, - ((struct ble_gatt_find_s_test_entry[]) { { - .inc_handle = 6, - .start_handle = 35, - .end_handle = 49, - .uuid = BLE_UUID16_DECLARE(0x5155), - }, { - .inc_handle = 9, - .start_handle = 543, - .end_handle = 870, - .uuid = BLE_UUID16_DECLARE(0x1122), - }, { - 0, - } }) - ); + ((struct ble_gatt_find_s_test_entry[]) { { + .inc_handle = 6, + .start_handle = 35, + .end_handle = 49, + .uuid = BLE_UUID16_DECLARE(0x5155), + }, { + .inc_handle = 9, + .start_handle = 543, + .end_handle = 870, + .uuid = BLE_UUID16_DECLARE(0x1122), + }, { + 0, + } }) + ); /* One 128-bit UUID service; two responses. */ ble_gatt_find_s_test_misc_init(); - ble_hs_test_util_create_conn(2, ((uint8_t[]){2,3,4,5,6,7,8,9}), + ble_hs_test_util_create_conn(2, ((uint8_t[]) {2,3,4,5,6,7,8,9}), NULL, NULL); ble_gatt_find_s_test_misc_find_inc(2, BLE_L2CAP_CID_ATT, 34, 100, - ((struct ble_gatt_find_s_test_entry[]) { { - .inc_handle = 36, - .start_handle = 403, - .end_handle = 859, - .uuid = BLE_UUID128_DECLARE(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), - }, { - 0, - } }) - ); + ((struct ble_gatt_find_s_test_entry[]) { { + .inc_handle = 36, + .start_handle = 403, + .end_handle = 859, + .uuid = + BLE_UUID128_DECLARE(1,2,3,4,5, + 6,7,8,9,10,11,12,13,14,15,16), + }, { + 0, + } }) + ); /* Two 128-bit UUID service; four responses. */ ble_gatt_find_s_test_misc_init(); - ble_hs_test_util_create_conn(2, ((uint8_t[]){2,3,4,5,6,7,8,9}), + ble_hs_test_util_create_conn(2, ((uint8_t[]) {2,3,4,5,6,7,8,9}), NULL, NULL); ble_gatt_find_s_test_misc_find_inc(2, BLE_L2CAP_CID_ATT, 34, 100, - ((struct ble_gatt_find_s_test_entry[]) { { - .inc_handle = 36, - .start_handle = 403, - .end_handle = 859, - .uuid = BLE_UUID128_DECLARE(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), - }, { - .inc_handle = 39, - .start_handle = 900, - .end_handle = 932, - .uuid = BLE_UUID128_DECLARE(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17), - }, { - 0, - } }) - ); + ((struct ble_gatt_find_s_test_entry[]) { { + .inc_handle = 36, + .start_handle = 403, + .end_handle = 859, + .uuid = + BLE_UUID128_DECLARE(1,2,3,4,5, + 6,7,8,9,10,11,12,13,14,15,16), + }, { + .inc_handle = 39, + .start_handle = 900, + .end_handle = 932, + .uuid = + BLE_UUID128_DECLARE(2,3,4,5,6, + 7,8,9,10,11,12,13,14,15,16,17), + }, { + 0, + } }) + ); /* Two 16-bit UUID; three 128-bit UUID; seven responses. */ ble_gatt_find_s_test_misc_init(); - ble_hs_test_util_create_conn(2, ((uint8_t[]){2,3,4,5,6,7,8,9}), + ble_hs_test_util_create_conn(2, ((uint8_t[]) {2,3,4,5,6,7,8,9}), NULL, NULL); ble_gatt_find_s_test_misc_find_inc(2, BLE_L2CAP_CID_ATT, 1, 100, - ((struct ble_gatt_find_s_test_entry[]) { { - .inc_handle = 36, - .start_handle = 403, - .end_handle = 859, - .uuid = BLE_UUID128_DECLARE(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), - }, { - .inc_handle = 37, - .start_handle = 35, - .end_handle = 49, - .uuid = BLE_UUID16_DECLARE(0x5155), - }, { - .inc_handle = 38, - .start_handle = 543, - .end_handle = 870, - .uuid = BLE_UUID16_DECLARE(0x1122), - }, { - .inc_handle = 39, - .start_handle = 900, - .end_handle = 932, - .uuid = BLE_UUID128_DECLARE(2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17), - }, { - .inc_handle = 40, - .start_handle = 940, - .end_handle = 950, - .uuid = BLE_UUID128_DECLARE(3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18), - }, { - 0, - } }) - ); + ((struct ble_gatt_find_s_test_entry[]) { { + .inc_handle = 36, + .start_handle = 403, + .end_handle = 859, + .uuid = + BLE_UUID128_DECLARE(1,2,3,4,5, + 6,7,8,9,10,11,12,13,14,15,16), + }, { + .inc_handle = 37, + .start_handle = 35, + .end_handle = 49, + .uuid = BLE_UUID16_DECLARE(0x5155), + }, { + .inc_handle = 38, + .start_handle = 543, + .end_handle = 870, + .uuid = BLE_UUID16_DECLARE(0x1122), + }, { + .inc_handle = 39, + .start_handle = 900, + .end_handle = 932, + .uuid = + BLE_UUID128_DECLARE(2,3,4,5,6, + 7,8,9,10,11,12,13,14,15,16,17), + }, { + .inc_handle = 40, + .start_handle = 940, + .end_handle = 950, + .uuid = + BLE_UUID128_DECLARE(3,4,5,6,7, + 8,9,10,11,12,13,14,15,16,17,18), + }, { + 0, + } }) + ); ble_hs_test_util_assert_mbufs_freed(NULL); } -TEST_CASE_SELF(ble_gatt_find_s_test_oom) -{ +TEST_CASE_SELF(ble_gatt_find_s_test_oom) { struct ble_gatt_find_s_test_entry incs[] = { { ``` </details> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org