Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Aug 2016 13:19:42 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r304676 - head/usr.sbin/fifolog/lib
Message-ID:  <201608231319.u7NDJg4R081065@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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");
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608231319.u7NDJg4R081065>