summaryrefslogtreecommitdiff
path: root/usr.bin/wall/wall.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/wall/wall.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/wall/wall.c')
-rw-r--r--usr.bin/wall/wall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/wall/wall.c b/usr.bin/wall/wall.c
index b44d1cffa5c..e2e4bb8b0dd 100644
--- a/usr.bin/wall/wall.c
+++ b/usr.bin/wall/wall.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wall.c,v 1.26 2015/01/16 06:40:14 deraadt Exp $ */
+/* $OpenBSD: wall.c,v 1.27 2015/08/20 22:32:42 deraadt Exp $ */
/* $NetBSD: wall.c,v 1.6 1994/11/17 07:17:58 jtc Exp $ */
/*
@@ -235,12 +235,12 @@ addgroup(struct group *grp, char *name)
for (i = 0; grp->gr_mem[i]; i++)
;
- g = (struct wallgroup *)malloc(sizeof *g);
+ g = malloc(sizeof *g);
if (g == NULL)
err(1, NULL);
g->gid = grp->gr_gid;
g->name = name;
- g->mem = (char **)calloc(i + 1, sizeof(char *));
+ g->mem = calloc(i + 1, sizeof(char *));
if (g->mem == NULL)
err(1, NULL);
for (i = 0; grp->gr_mem[i] != NULL; i++) {