{
RET_IF(gatt == NULL, "Invalid parameter.");
RET_IF(address == NULL, "Invalid parameter.");
- RET_IF(gatt->role.server == NULL || gatt->role.server->client_list, "Invalid parameter.");
+ RET_IF(gatt->role.server == NULL
+ || gatt->role.server->client_list == NULL, "Invalid parameter.");
vine_gatt_s *client_gatt = __find_client_gatt(gatt, address);
RET_IF(client_gatt == NULL, "Cannot find a client[%s].", address);
}
descriptor = _add_gatt_descriptor(characteristic);
- if (!characteristic) {
+ if (!descriptor) {
VINE_LOGE("Failed to add descriptor.");
goto ERR;
}
RET_VAL_IF(handle == NULL, VINE_DATA_PATH_ERROR_INVALID_PARAMETER, "handle is NULL");
vine_gatt_s *gatt = (vine_gatt_s *)handle;
- int ret;
+ int ret = BT_ERROR_NONE;
if (gatt->type == VINE_GATT_ROLE_SERVER && gatt->role.server) {
ret = bt_gatt_server_unregister_service(gatt->role.server->server, gatt->service);