Changed Device_Object_List_Identifier() to use uint32_t for array_index since that is the size decoded in a ReadProperty request, and unsigned is not always 32-bit.

This commit is contained in:
skarg
2016-10-25 13:10:28 +00:00
parent ec2b585e18
commit b2938bb68a
15 changed files with 71 additions and 71 deletions
+6 -6
View File
@@ -505,13 +505,13 @@ unsigned Device_Object_List_Count(void)
return count;
}
bool Device_Object_List_Identifier(unsigned array_index,
bool Device_Object_List_Identifier(uint32_t array_index,
int *object_type,
uint32_t * instance)
{
bool status = false;
unsigned count = 0;
unsigned object_index = 0;
uint32_t count = 0;
uint32_t object_index = 0;
struct my_object_functions *pObject = NULL;
/* array index zero is length - so invalid */
@@ -545,7 +545,7 @@ bool Device_Valid_Object_Name(BACNET_CHARACTER_STRING * object_name1,
bool found = false;
int type = 0;
uint32_t instance;
unsigned max_objects = 0, i = 0;
uint32_t max_objects = 0, i = 0;
bool check_id = false;
BACNET_CHARACTER_STRING object_name2;
struct my_object_functions *pObject = NULL;
@@ -609,10 +609,10 @@ int Device_Read_Property_Local(BACNET_READ_PROPERTY_DATA * rpdata)
int len = 0; /* apdu len intermediate value */
BACNET_BIT_STRING bit_string = { 0 };
BACNET_CHARACTER_STRING char_string = { 0 };
unsigned i = 0;
uint32_t i = 0;
int object_type = 0;
uint32_t instance = 0;
unsigned count = 0;
uint32_t count = 0;
uint8_t *apdu = NULL;
struct my_object_functions *pObject = NULL;