Add fixes suggested by using "infer"

This commit is contained in:
Mike Brady
2017-09-03 22:46:57 +01:00
parent 31a09bb368
commit 48c1d3eb20
6 changed files with 138 additions and 63 deletions
+1
View File
@@ -47,6 +47,7 @@
#define MALLOC_ZERO_STRUCT(x, type) \
x = malloc(sizeof(struct type)); \
if (x) \
memset(x, 0, sizeof(struct type));
#define DECL_MALLOC_ZERO_STRUCT(x, type) struct type *MALLOC_ZERO_STRUCT(x, type)