format code

This commit is contained in:
Steve Karg
2023-10-21 08:45:18 -05:00
parent 3870bb3826
commit 657973d322
+10 -7
View File
@@ -127,14 +127,16 @@ int rpm_ack_decode_service_request(
apdu++; apdu++;
} else { } else {
while (value && (apdu_len > 0)) { while (value && (apdu_len > 0)) {
len = bacapp_decode_known_property(apdu, (unsigned)apdu_len, len = bacapp_decode_known_property(apdu,
value, rpm_object->object_type, (unsigned)apdu_len, value, rpm_object->object_type,
rpm_property->propertyIdentifier); rpm_property->propertyIdentifier);
/* If len == 0 then it's an empty structure, which is OK. */ /* If len == 0 then it's an empty structure, which is
* OK. */
if (len < 0) { if (len < 0) {
/* problem decoding */ /* problem decoding */
PERROR("RPM Ack: unable to decode! %s:%s\n", PERROR("RPM Ack: unable to decode! %s:%s\n",
bactext_object_type_name(rpm_object->object_type), bactext_object_type_name(
rpm_object->object_type),
bactext_property_name( bactext_property_name(
rpm_property->propertyIdentifier)); rpm_property->propertyIdentifier));
/* note: caller will free the memory */ /* note: caller will free the memory */
@@ -150,12 +152,13 @@ int rpm_ack_decode_service_request(
break; break;
} else if (len > 0) { } else if (len > 0) {
old_value = value; old_value = value;
value = value = calloc(
calloc(1, sizeof(BACNET_APPLICATION_DATA_VALUE)); 1, sizeof(BACNET_APPLICATION_DATA_VALUE));
old_value->next = value; old_value->next = value;
} else { } else {
PERROR("RPM Ack: decoded %s:%s len=%d\n", PERROR("RPM Ack: decoded %s:%s len=%d\n",
bactext_object_type_name(rpm_object->object_type), bactext_object_type_name(
rpm_object->object_type),
bactext_property_name( bactext_property_name(
rpm_property->propertyIdentifier), rpm_property->propertyIdentifier),
len); len);