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
+4 -4
View File
@@ -512,7 +512,7 @@ unsigned Device_Object_List_Count(
* @return True if found, else false.
*/
bool Device_Object_List_Identifier(
unsigned array_index,
uint32_t array_index,
int *object_type,
uint32_t * instance)
{
@@ -578,7 +578,7 @@ bool Device_Valid_Object_Name(
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 object_functions *pObject = NULL;
@@ -808,10 +808,10 @@ int Device_Read_Property_Local(
int len = 0; /* apdu len intermediate value */
BACNET_BIT_STRING bit_string;
BACNET_CHARACTER_STRING char_string;
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 object_functions *pObject = NULL;
bool found = false;
+7 -7
View File
@@ -1068,14 +1068,14 @@ unsigned Device_Object_List_Count(
* @return True if found, else false.
*/
bool Device_Object_List_Identifier(
unsigned array_index,
uint32_t array_index,
int *object_type,
uint32_t * instance)
{
bool status = false;
unsigned count = 0;
unsigned object_index = 0;
unsigned temp_index = 0;
uint32_t count = 0;
uint32_t object_index = 0;
uint32_t temp_index = 0;
struct object_functions *pObject = NULL;
/* array index zero is length - so invalid */
@@ -1134,7 +1134,7 @@ bool Device_Valid_Object_Name(
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 object_functions *pObject = NULL;
@@ -1369,10 +1369,10 @@ int Device_Read_Property_Local(
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 object_functions *pObject = NULL;
bool found = false;
+1 -1
View File
@@ -275,7 +275,7 @@ extern "C" {
unsigned Device_Object_List_Count(
void);
bool Device_Object_List_Identifier(
unsigned array_index,
uint32_t array_index,
int *object_type,
uint32_t * instance);