Splinted the code, and fixed the errors.

This commit is contained in:
skarg
2011-08-24 23:29:53 +00:00
parent 58691c16d6
commit 3e134011a1
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -690,8 +690,6 @@ int bacapp_decode_context_data(
uint8_t tag_number = 0;
uint32_t len_value_type = 0;
/* FIXME: use max_apdu_len! */
max_apdu_len = max_apdu_len;
if (apdu && value && IS_CONTEXT_SPECIFIC(*apdu)) {
value->context_specific = true;
value->next = NULL;
@@ -700,7 +698,7 @@ int bacapp_decode_context_data(
&len_value_type);
apdu_len = tag_len;
/* Empty construct : (closing tag) => returns NULL value */
if (tag_len && tag_len <= max_apdu_len &&
if (tag_len && ((unsigned)tag_len <= max_apdu_len) &&
!decode_is_closing_tag_number(&apdu[0], tag_number)) {
value->context_tag = tag_number;
value->tag = bacapp_context_tag_type(property, tag_number);
+1 -1
View File
@@ -58,7 +58,7 @@ int get_alarm_sumary_ack_encode_apdu_data(
else if(max_apdu >= 10) {
/* tag 0 - Object Identifier */
apdu_len += encode_application_object_id(&apdu[apdu_len],
get_alarm_data->objectIdentifier.type,
(int)get_alarm_data->objectIdentifier.type,
get_alarm_data->objectIdentifier.instance);
/* tag 1 - Alarm State */
apdu_len += encode_application_enumerated(&apdu[apdu_len],