svn commit: r304676 - head/usr.sbin/fifolog/lib
Marcelo Araujo
araujo at FreeBSD.org
Tue Aug 23 13:19:44 UTC 2016
Author: araujo
Date: Tue Aug 23 13:19:42 2016
New Revision: 304676
URL: https://svnweb.freebsd.org/changeset/base/304676
Log:
Fix calloc(3) argument order.
MFC after: 4 weeks.
Modified:
head/usr.sbin/fifolog/lib/fifolog_int.c
head/usr.sbin/fifolog/lib/fifolog_reader.c
Modified: head/usr.sbin/fifolog/lib/fifolog_int.c
==============================================================================
--- head/usr.sbin/fifolog/lib/fifolog_int.c Tue Aug 23 12:22:35 2016 (r304675)
+++ head/usr.sbin/fifolog/lib/fifolog_int.c Tue Aug 23 13:19:42 2016 (r304676)
@@ -125,7 +125,7 @@ fifolog_int_open_i(struct fifolog_file *
/* Initialize zlib handling */
- f->zs = calloc(sizeof *f->zs, 1);
+ f->zs = calloc(1, sizeof(*f->zs));
if (f->zs == NULL)
return ("cannot malloc");
Modified: head/usr.sbin/fifolog/lib/fifolog_reader.c
==============================================================================
--- head/usr.sbin/fifolog/lib/fifolog_reader.c Tue Aug 23 12:22:35 2016 (r304675)
+++ head/usr.sbin/fifolog/lib/fifolog_reader.c Tue Aug 23 13:19:42 2016 (r304676)
@@ -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");
More information about the svn-src-head
mailing list