diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/README.md b/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/README.md index 9be317a527c..37442fa97f0 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/README.md +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/README.md @@ -169,9 +169,6 @@ The characteristic is binded with `led_chr_access` callback function, in which t ``` C static int led_chr_access(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg) { - /* Local variables */ - int rc; - /* Handle access events */ /* Note: LED characteristic is write only */ switch (ctxt->op) { @@ -203,7 +200,7 @@ static int led_chr_access(uint16_t conn_handle, uint16_t attr_handle, } else { goto error; } - return rc; + return 0; } goto error; diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/main/src/gatt_svc.c b/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/main/src/gatt_svc.c index 4e521e348b5..bf03d4023f4 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/main/src/gatt_svc.c +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/main/src/gatt_svc.c @@ -114,9 +114,6 @@ error: static int led_chr_access(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg) { - /* Local variables */ - int rc = 0; - /* Handle access events */ /* Note: LED characteristic is write only */ switch (ctxt->op) { @@ -148,7 +145,7 @@ static int led_chr_access(uint16_t conn_handle, uint16_t attr_handle, } else { goto error; } - return rc; + return 0; } goto error; diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/main/src/gatt_svc.c b/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/main/src/gatt_svc.c index d819be8e5be..726a4f2bb60 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/main/src/gatt_svc.c +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/main/src/gatt_svc.c @@ -117,9 +117,6 @@ error: static int led_chr_access(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt *ctxt, void *arg) { - /* Local variables */ - int rc = 0; - /* Handle access events */ /* Note: LED characteristic is write only */ switch (ctxt->op) { @@ -151,7 +148,7 @@ static int led_chr_access(uint16_t conn_handle, uint16_t attr_handle, } else { goto error; } - return rc; + return 0; } goto error;