소스 검색

return data type changed (GetCipDataTypeLength)

micsat 4 년 전
부모
커밋
1e577a6e87
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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>
 
 /* 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) {
 		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
  * @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
  *