In the end we check the status anyway so its safe to break out of switch statement. There is also no point in calling 'goto label' when the 'label' is right after switch statement closing bracket. --- android/gatt.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/android/gatt.c b/android/gatt.c index 49bcda2..c518d27 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -6617,8 +6617,6 @@ static void att_handler(const uint8_t *ipdu, uint16_t len, gpointer user_data) break; case ATT_OP_WRITE_REQ: status = write_req_request(ipdu, len, dev); - if (!status) - return; break; case ATT_OP_WRITE_CMD: write_cmd_request(ipdu, len, dev); @@ -6630,22 +6628,18 @@ static void att_handler(const uint8_t *ipdu, uint16_t len, gpointer user_data) return; case ATT_OP_PREP_WRITE_REQ: status = write_prep_request(ipdu, len, dev); - if (!status) - return; break; case ATT_OP_FIND_BY_TYPE_REQ: status = find_by_type_request(ipdu, len, dev); break; case ATT_OP_EXEC_WRITE_REQ: status = write_execute_request(ipdu, len, dev); - if (!status) - return; break; case ATT_OP_READ_MULTI_REQ: default: DBG("Unsupported request 0x%02x", ipdu[0]); status = ATT_ECODE_REQ_NOT_SUPP; - goto done; + break; } done: -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html