Skip to content

Commit

Permalink
fix order of arguments in call to calloc (#132)
Browse files Browse the repository at this point in the history
GCC 14 reports it as "error: ‘calloc’ sizes specified with ‘sizeof’ in
the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]" and compilation fails otherwise.
  • Loading branch information
thranur authored Sep 17, 2024
1 parent 19ad3a4 commit ce27845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion map/sc_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
v++; \
\
*cap = v; \
t = sc_map_calloc(sizeof(*t), v + 1); \
t = sc_map_calloc(v + 1, sizeof(*t)); \
return t ? &t[1] : NULL; \
} \
\
Expand Down

0 comments on commit ce27845

Please sign in to comment.