diff --git a/bacnet-stack/demo/handler/h_whois.c b/bacnet-stack/demo/handler/h_whois.c index f20df658..d1e4a021 100644 --- a/bacnet-stack/demo/handler/h_whois.c +++ b/bacnet-stack/demo/handler/h_whois.c @@ -100,7 +100,7 @@ void handler_who_is_unicast( /* If no limits, then always respond */ if (len == 0) Send_I_Am_Unicast(&Handler_Transmit_Buffer[0], src); - else if (len != -1) { + else if (len != BACNET_STATUS_ERROR) { /* is my device id within the limits? */ if (((Device_Object_Instance_Number() >= (uint32_t) low_limit) && (Device_Object_Instance_Number() <= (uint32_t) high_limit)) @@ -147,7 +147,7 @@ static void check_who_is_for_routing( len = whois_decode_service_request(service_request, service_len, &low_limit, &high_limit); - if (len == -1) { + if (len == BACNET_STATUS_ERROR) { /* Invalid; just leave */ return; } diff --git a/bacnet-stack/ports/atmega168/h_whois.c b/bacnet-stack/ports/atmega168/h_whois.c index 89418ab2..05d82011 100644 --- a/bacnet-stack/ports/atmega168/h_whois.c +++ b/bacnet-stack/ports/atmega168/h_whois.c @@ -55,7 +55,7 @@ void handler_who_is( &high_limit); if (len == 0) { Send_I_Am_Flag = true; - } else if (len != -1) { + } else if (len != BACNET_STATUS_ERROR) { /* is my device id within the limits? */ target_device = Device_Object_Instance_Number(); if (((target_device >= low_limit) && (target_device <= high_limit))