[Midnightbsd-cvs] src [10768] trunk/usr.sbin/fifolog/lib: sync
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Jun 9 22:35:17 EDT 2018
Revision: 10768
http://svnweb.midnightbsd.org/src/?rev=10768
Author: laffer1
Date: 2018-06-09 22:35:16 -0400 (Sat, 09 Jun 2018)
Log Message:
-----------
sync
Modified Paths:
--------------
trunk/usr.sbin/fifolog/lib/Makefile
trunk/usr.sbin/fifolog/lib/fifolog_create.c
trunk/usr.sbin/fifolog/lib/fifolog_reader.c
trunk/usr.sbin/fifolog/lib/fifolog_write_poll.c
trunk/usr.sbin/fifolog/lib/miniobj.h
Modified: trunk/usr.sbin/fifolog/lib/Makefile
===================================================================
--- trunk/usr.sbin/fifolog/lib/Makefile 2018-06-10 02:31:20 UTC (rev 10767)
+++ trunk/usr.sbin/fifolog/lib/Makefile 2018-06-10 02:35:16 UTC (rev 10768)
@@ -1,4 +1,5 @@
# $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/fifolog/lib/Makefile 249657 2013-04-19 19:45:00Z ed $
LIB= fifolog
INTERNALLIB= # API not published or supported.
@@ -8,4 +9,6 @@
CFLAGS+= -I${.CURDIR}
+NO_WMISSING_VARIABLE_DECLARATIONS=
+
.include <bsd.lib.mk>
Modified: trunk/usr.sbin/fifolog/lib/fifolog_create.c
===================================================================
--- trunk/usr.sbin/fifolog/lib/fifolog_create.c 2018-06-10 02:31:20 UTC (rev 10767)
+++ trunk/usr.sbin/fifolog/lib/fifolog_create.c 2018-06-10 02:35:16 UTC (rev 10768)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2005-2008 Poul-Henning Kamp
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.sbin/fifolog/lib/fifolog_create.c 306910 2016-10-09 19:58:27Z pfg $
*/
#include <assert.h>
@@ -97,7 +98,7 @@
if (S_ISREG(st.st_mode) && ftruncate(fd, size) < 0)
return ("Could not ftrunc");
- buf = calloc(recsize, 1);
+ buf = calloc(1, recsize);
if (buf == NULL)
return ("Could not malloc");
Modified: trunk/usr.sbin/fifolog/lib/fifolog_reader.c
===================================================================
--- trunk/usr.sbin/fifolog/lib/fifolog_reader.c 2018-06-10 02:31:20 UTC (rev 10767)
+++ trunk/usr.sbin/fifolog/lib/fifolog_reader.c 2018-06-10 02:35:16 UTC (rev 10768)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2005-2008 Poul-Henning Kamp
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.sbin/fifolog/lib/fifolog_reader.c 306910 2016-10-09 19:58:27Z pfg $
*/
#include <stdio.h>
@@ -67,10 +68,10 @@
if (retval != NULL)
err(1, "%s", retval);
- fr->olen = fr->ff->recsize * 16;
- fr->obuf = calloc(fr->olen, 1);
+ fr->obuf = calloc(16, fr->ff->recsize);
if (fr->obuf == NULL)
err(1, "Cannot malloc");
+ fr->olen = fr->ff->recsize * 16;
i = inflateInit(fr->ff->zs);
assert(i == Z_OK);
Modified: trunk/usr.sbin/fifolog/lib/fifolog_write_poll.c
===================================================================
--- trunk/usr.sbin/fifolog/lib/fifolog_write_poll.c 2018-06-10 02:31:20 UTC (rev 10767)
+++ trunk/usr.sbin/fifolog/lib/fifolog_write_poll.c 2018-06-10 02:35:16 UTC (rev 10768)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*-
* Copyright (c) 2005-2008 Poul-Henning Kamp
* All rights reserved.
@@ -23,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
+ * $FreeBSD: stable/10/usr.sbin/fifolog/lib/fifolog_write_poll.c 306910 2016-10-09 19:58:27Z pfg $
*/
#include <assert.h>
@@ -45,7 +46,7 @@
static int fifolog_write_gzip(struct fifolog_writer *f, time_t now);
#define ALLOC(ptr, size) do { \
- (*(ptr)) = calloc(size, 1); \
+ (*(ptr)) = calloc(1, size); \
assert(*(ptr) != NULL); \
} while (0)
Modified: trunk/usr.sbin/fifolog/lib/miniobj.h
===================================================================
--- trunk/usr.sbin/fifolog/lib/miniobj.h 2018-06-10 02:31:20 UTC (rev 10767)
+++ trunk/usr.sbin/fifolog/lib/miniobj.h 2018-06-10 02:35:16 UTC (rev 10768)
@@ -24,11 +24,12 @@
* SUCH DAMAGE.
*
* $MidnightBSD$
+ * $FreeBSD: stable/10/usr.sbin/fifolog/lib/miniobj.h 306910 2016-10-09 19:58:27Z pfg $
*/
#define ALLOC_OBJ(to, type_magic) \
do { \
- (to) = calloc(sizeof *(to), 1); \
+ (to) = calloc(1, sizeof *(to)); \
if ((to) != NULL) \
(to)->magic = (type_magic); \
} while (0)
More information about the Midnightbsd-cvs
mailing list