summaryrefslogtreecommitdiff
path: root/include/dlt/dlt_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/dlt/dlt_common.h')
-rw-r--r--include/dlt/dlt_common.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h
index 049b6ee..7973ab1 100644
--- a/include/dlt/dlt_common.h
+++ b/include/dlt/dlt_common.h
@@ -300,10 +300,10 @@ enum {
# define DLT_MSG_READ_VALUE(dst, src, length, type) \
{ \
- if ((length < 0) || ((length) < ((int32_t) sizeof(type)))) \
+ if ((length < 0) || ((length) < ((int32_t)sizeof(type)))) \
{ length = -1; } \
else \
- { dst = *((type *)src); src += sizeof(type); length -= (int32_t) sizeof(type); } \
+ { dst = *((type *)src); src += sizeof(type); length -= sizeof(type); } \
}
# define DLT_MSG_READ_ID(dst, src, length) \
@@ -322,7 +322,7 @@ enum {
} \
else \
{ \
- memcpy(dst, src, (size_t) length); \
+ memcpy(dst, src, length); \
dlt_clean_string(dst, length); \
dst[length] = 0; \
src += length; \
@@ -500,14 +500,14 @@ typedef struct sDltMessage
int32_t resync_offset;
/* size parameters */
- uint32_t headersize; /**< size of complete header including storage header */
- uint32_t datasize; /**< size of complete payload */
+ int32_t headersize; /**< size of complete header including storage header */
+ int32_t datasize; /**< size of complete payload */
/* buffer for current loaded message */
uint8_t headerbuffer[sizeof(DltStorageHeader) +
sizeof(DltStandardHeader) + sizeof(DltStandardHeaderExtra) + sizeof(DltExtendedHeader)]; /**< buffer for loading complete header */
uint8_t *databuffer; /**< buffer for loading payload */
- uint32_t databuffersize;
+ int32_t databuffersize;
/* header values of current loaded message */
DltStorageHeader *storageheader; /**< pointer to storage header of current loaded header */
@@ -778,12 +778,12 @@ typedef struct
int32_t lastBytesRcvd; /**< bytes received in last receive call */
int32_t bytesRcvd; /**< received bytes */
int32_t totalBytesRcvd; /**< total number of received bytes */
- char *buffer; /**< pointer to receiver buffer */
- char *buf; /**< pointer to position within receiver buffer */
- char *backup_buf; /** pointer to the buffer with partial messages if any **/
- int fd; /**< connection handle */
+ char *buffer; /**< pointer to receiver buffer */
+ char *buf; /**< pointer to position within receiver buffer */
+ char *backup_buf; /** pointer to the buffer with partial messages if any **/
+ int fd; /**< connection handle */
DltReceiverType type; /**< type of connection handle */
- uint32_t buffersize; /**< size of receiver buffer */
+ int32_t buffersize; /**< size of receiver buffer */
struct sockaddr_in addr; /**< socket address information */
} DltReceiver;
@@ -1301,7 +1301,7 @@ DltReturnValue dlt_check_storageheader(DltStorageHeader *storageheader);
* @param required size
* @return negative value if required size is not sufficient
* */
-DltReturnValue dlt_check_rcv_data_size(uint32_t received, uint32_t required);
+DltReturnValue dlt_check_rcv_data_size(int received, int required);
/**
* Initialise static ringbuffer with a size of size.