Bläddra i källkod

return data type changed (GetCipDataTypeLength)

micsat 4 år sedan
förälder
incheckning
1e577a6e87
2 ändrade filer med 3 tillägg och 3 borttagningar
  1. 2 2
      source/src/cip/ciptypes.c
  2. 1 1
      source/src/cip/ciptypes.h

+ 2 - 2
source/src/cip/ciptypes.c

@@ -8,9 +8,9 @@
 #include <trace.h>
 #include <trace.h>
 
 
 /* functions*/
 /* functions*/
-int GetCipDataTypeLength(EipUint8 type, const EipUint8 *data) {
+size_t GetCipDataTypeLength(EipUint8 type, const EipUint8 *data) {
 
 
-	int length = 0;
+	size_t length = 0;
 
 
 	switch (type) {
 	switch (type) {
 		case kCipBool:
 		case kCipBool:

+ 1 - 1
source/src/cip/ciptypes.h

@@ -65,7 +65,7 @@ typedef enum cip_data_types {
  * @param data use data pointer if data length is variable, else set NULL
  * @param data use data pointer if data length is variable, else set NULL
  * @return size of CIP data type in bytes
  * @return size of CIP data type in bytes
  * */
  * */
-int GetCipDataTypeLength(EipUint8 type, const EipUint8 *data);
+size_t GetCipDataTypeLength(EipUint8 type, const EipUint8 *data);
 
 
 /** @brief Definition of CIP service codes
 /** @brief Definition of CIP service codes
  *
  *