mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
Merge branch 'contrib/github_pr_18761_v6.0' into 'release/v6.0'
fix(nimble): initialize return value in LED characteristic access cal… (GitHub PR) (v6.0) See merge request espressif/esp-idf!50151
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user