Fix calloc(3) argument order.
MFC after: 4 weeks.
This commit is contained in:
parent
a48ec78e96
commit
5ddd0f16c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=304676
@ -125,7 +125,7 @@ fifolog_int_open_i(struct fifolog_file *f, const char *fname, int mode)
|
||||
|
||||
/* Initialize zlib handling */
|
||||
|
||||
f->zs = calloc(sizeof *f->zs, 1);
|
||||
f->zs = calloc(1, sizeof(*f->zs));
|
||||
if (f->zs == NULL)
|
||||
return ("cannot malloc");
|
||||
|
||||
|
@ -59,7 +59,7 @@ fifolog_reader_open(const char *fname)
|
||||
struct fifolog_reader *fr;
|
||||
int i;
|
||||
|
||||
fr = calloc(sizeof *fr, 1);
|
||||
fr = calloc(1, sizeof(*fr));
|
||||
if (fr == NULL)
|
||||
err(1, "Cannot malloc");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user