Skip to content
Snippets Groups Projects
Commit 946035c2 authored by Sebastien Ponce's avatar Sebastien Ponce Committed by Steven Murray
Browse files

many fixes of little issues found by the cppcheck tool. In particular, a few...

many fixes of little issues found by the cppcheck tool. In particular, a few memory leak were discovered.
parent 24564bdf
Branches
Tags
No related merge requests found
......@@ -81,7 +81,7 @@ typedef char* bitvct; /* bit vector type definition */
INC_PTR(ptr,BYTESIZE); \
}
#define unmarshall_BYTE(ptr,n) { BYTE n_; \
#define unmarshall_BYTE(ptr,n) { BYTE n_ = 0; \
(void) memcpy(BYTEADDR(n_),(ptr),BYTESIZE); \
n = n_; \
INC_PTR(ptr,BYTESIZE); \
......@@ -150,7 +150,7 @@ EXTERN_C int _unmarshall_STRINGN (char **, char*, int);
INC_PTR(ptr,LONGSIZE); \
}
#define unmarshall_HYPER(ptr,n) { U_HYPER u_; \
#define unmarshall_HYPER(ptr,n) { U_HYPER u_ = 0; \
LONG n_ = 0; \
(void) memcpy(LONGADDR(n_),(ptr),LONGSIZE); \
*((LONG *)&(u_)) = ntohl((unsigned long)(n_)); \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment