File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2525
2626#define ALLOC_OBJ (to , type_magic ) \
2727 do { \
28- (to) = calloc(1, sizeof *(to)); \
28+ (to) = calloc((size_t) 1, sizeof *(to)); \
2929 if ((to) != NULL) \
3030 (to)->magic = (type_magic); \
3131 } while (0)
3232
3333#define ALLOC_OBJ_EXTRA (to , extra_size , type_magic ) \
3434 do { \
35- (to) = calloc(1, sizeof(*(to)) + (extra_size)); \
35+ (to) = calloc((size_t) 1, sizeof(*(to)) + (extra_size)); \
3636 if ((to) != NULL) \
3737 (to)->magic = (type_magic); \
3838 } while (0)
4242
4343#define ALLOC_FLEX_OBJ (to , fld , len , type_magic ) \
4444 do { \
45- (to) = calloc(1, SIZEOF_FLEX_OBJ(to, fld, len)); \
45+ (to) = calloc((size_t) 1, SIZEOF_FLEX_OBJ(to, fld, len));\
4646 if ((to) != NULL) \
4747 (to)->magic = (type_magic); \
4848 } while (0)
You can’t perform that action at this time.
0 commit comments