summaryrefslogtreecommitdiff
path: root/usr.bin/newsyslog/newsyslog.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:32:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:32:43 +0000
commit6e5d9523d6273368df6377a4db98a9533d11505c (patch)
tree665d65c04b5874cca0392587a8c45d740f3af051 /usr.bin/newsyslog/newsyslog.c
parent856a95e3f951c7875c113b683b773a7bccf1e685 (diff)
Do not cast result of malloc/calloc/realloc* if stdlib.h is in scope
ok krw millert
Diffstat (limited to 'usr.bin/newsyslog/newsyslog.c')
-rw-r--r--usr.bin/newsyslog/newsyslog.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c
index 1bd3fece8e3..761da365f9d 100644
--- a/usr.bin/newsyslog/newsyslog.c
+++ b/usr.bin/newsyslog/newsyslog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newsyslog.c,v 1.94 2015/02/08 23:40:34 deraadt Exp $ */
+/* $OpenBSD: newsyslog.c,v 1.95 2015/08/20 22:32:41 deraadt Exp $ */
/*
* Copyright (c) 1999, 2002, 2003 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -225,7 +225,7 @@ main(int argc, char **argv)
p = x;
}
- pidlist = (struct pidinfo *)calloc(listlen + 1, sizeof(struct pidinfo));
+ pidlist = calloc(listlen + 1, sizeof(struct pidinfo));
if (pidlist == NULL)
err(1, "calloc");
@@ -1019,7 +1019,7 @@ domonitor(struct conf_entry *ent)
/* Now see if current size is larger. */
if (sb.st_size > osize) {
- rb = (char *) malloc(sb.st_size - osize);
+ rb = malloc(sb.st_size - osize);
if (rb == NULL)
err(1, "malloc");