BugID:17573638:fix white scan issue
@@ -200,8 +200,7 @@ static void iotx_device_name_auth_callback(void *user, void *p_message)
case COAP_MSG_CODE_205_CONTENT: {
if (COAP_ENDPOINT_PSK == p_iotx_coap->p_coap_ctx->network.ep_type) {
ret_code = iotx_parse_auth_from_json((char *)message->payload, p_iotx_coap);
- }
- else{
+ } else {
ret_code = iotx_get_token_from_json((char *)message->payload, p_iotx_coap->p_auth_token, p_iotx_coap->auth_token_len);
}
@@ -472,7 +471,7 @@ int iotx_aes_cbc_decrypt (const unsigned char* src, int len, const unsigned char
out_c[len - pad] = 0;
COAP_DEBUG("decrypt data:%s, len:%d", out_c, len - pad);
HAL_Aes128_Destroy(aes_d_h);
- return ret == 0? len - pad : 0;
+ return len - pad;
}
}
HAL_Aes128_Destroy(aes_d_h);
@@ -701,8 +700,7 @@ int IOT_CoAP_SendMessage(iotx_coap_context_t *p_context, char *p_path, iotx_mess
len = iotx_aes_cbc_encrypt(buff, strlen((char *)buff), p_iotx_coap->key, seq);
if (0 < len) {
Cloud_CoAPStrOption_add(&message, COAP_OPTION_SEQ, (unsigned char *)seq, len);
- }
- else{
+ } else {
COAP_INFO("Encrypt seq failed");
}
HEXDUMP_DEBUG(seq, len);
