diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2015-02-11 15:34:06 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-02-13 12:43:18 +0100 |
commit | 2d927d8dbf83bbe1bcba79d1d46272043c208cac (patch) | |
tree | 892c1b6be0383dcb1e42e0c3151350048068f225 /android/gatt.c | |
parent | 27c8b368c8f3720c77b1eb2d22d6841e1653a71e (diff) | |
download | bluez-2d927d8dbf83bbe1bcba79d1d46272043c208cac.tar.gz |
android/gatt: Remove not needed checks and jumps
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.
Diffstat (limited to 'android/gatt.c')
-rw-r--r-- | android/gatt.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/android/gatt.c b/android/gatt.c index 44b3f0424..ae8fca568 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -6642,8 +6642,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); @@ -6655,22 +6653,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: |