You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ry...@apache.org on 2020/05/08 09:03:39 UTC
[mynewt-nimble] 01/02: blestress: Minor coding style
This is an automated email from the ASF dual-hosted git repository.
rymek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit a2c5dfaa47116431d29df1dbe0d3bb909c43dbf9
Author: Ćukasz Rymanowski <lu...@codecoup.pl>
AuthorDate: Fri Apr 17 10:03:14 2020 +0200
blestress: Minor coding style
---
apps/blestress/src/tx_stress.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/apps/blestress/src/tx_stress.c b/apps/blestress/src/tx_stress.c
index b73adc8..1e62491 100644
--- a/apps/blestress/src/tx_stress.c
+++ b/apps/blestress/src/tx_stress.c
@@ -1292,17 +1292,16 @@ tx_stress_14_subs_cb(uint16_t conn_handle, const struct ble_gatt_error *error,
assert(error->status == 0);
/* If the first subscription after finding cccd */
- if(arg == NULL) {
+ if (arg == NULL) {
return 0;
}
- sub = (bool*)arg;
+ sub = (bool *)arg;
/* Enable notifications */
- if(*sub == 0) {
+ if (*sub == 0) {
*sub = true;
- om = ble_hs_mbuf_from_flat(
- (uint8_t[]) {0x01, 0x00}, 2);
+ om = ble_hs_mbuf_from_flat((uint8_t[]) {0x01, 0x00}, 2);
tx_stress_ctx->begin_us = tx_stress_ctx->end_us;
@@ -1415,7 +1414,7 @@ tx_stress_14_gap_event(struct ble_gap_event *event, void *arg)
static int
tx_stress_15_write_cb(uint16_t conn_handle, const struct ble_gatt_error *error,
- struct ble_gatt_attr *attr, void *arg)
+ struct ble_gatt_attr *attr, void *arg)
{
/* Disconnect */
ble_gap_terminate(conn_handle, BLE_ERR_REM_USER_CONN_TERM);
@@ -1464,7 +1463,7 @@ tx_stress_15_gap_event(struct ble_gap_event *event, void *arg)
case BLE_GAP_EVENT_DISCONNECT:
/* Perform use case specified number of times */
- if(tx_stress_ctx->con_stat[15].num >= MYNEWT_VAL(BLE_STRESS_REPEAT)) {
+ if (tx_stress_ctx->con_stat[15].num >= MYNEWT_VAL(BLE_STRESS_REPEAT)) {
tx_stress_on_test_finish(15);
return 0;
}
@@ -1473,7 +1472,7 @@ tx_stress_15_gap_event(struct ble_gap_event *event, void *arg)
return 0;
default:
- MODLOG_DFLT(INFO, "Other event occurs=%d\n", event->type);
+ MODLOG_DFLT(INFO, "Other event occurs=%d\n", event->type);
return 0;
}
}
@@ -1607,7 +1606,8 @@ tx_stress_test_perform(int test_num)
}
static void
-tx_stress_read_command_cb(void) {
+tx_stress_read_command_cb(void)
+{
console_printf("Start testing\n");
os_sem_release(&tx_stress_main_sem);
}
@@ -1642,7 +1642,7 @@ tx_stress_main_task_fn(void *arg)
/* Wait for the scan to find the test. Then 1 token will be
* released allowing to pass through semaphore. */
os_sem_pend(&tx_stress_main_sem, OS_TIMEOUT_NEVER);
- if(tx_stress_ctx->scan_timeout) {
+ if (tx_stress_ctx->scan_timeout) {
break;
}