summaryrefslogtreecommitdiff
path: root/bin/expr
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-11 17:15:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-11 17:15:47 +0000
commit5f4893e9d7dad1829c0768338741a3480338f44e (patch)
treec45f49be20edf7bd517613de687e99891ef60b4b /bin/expr
parent1d82efdb7841975a10970129d9691f11b10b9165 (diff)
avoid casts of malloc() if stdlib.h is present
Diffstat (limited to 'bin/expr')
-rw-r--r--bin/expr/expr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/expr/expr.c b/bin/expr/expr.c
index e8f6dffac2b..b5cd6063b9a 100644
--- a/bin/expr/expr.c
+++ b/bin/expr/expr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: expr.c,v 1.19 2013/11/21 15:54:45 deraadt Exp $ */
+/* $OpenBSD: expr.c,v 1.20 2015/08/11 17:15:46 deraadt Exp $ */
/* $NetBSD: expr.c,v 1.3.6.1 1996/06/04 20:41:47 cgd Exp $ */
/*
@@ -58,7 +58,7 @@ make_int(int i)
{
struct val *vp;
- vp = (struct val *) malloc(sizeof(*vp));
+ vp = malloc(sizeof(*vp));
if (vp == NULL) {
err(3, NULL);
}
@@ -73,7 +73,7 @@ make_str(char *s)
{
struct val *vp;
- vp = (struct val *) malloc(sizeof(*vp));
+ vp = malloc(sizeof(*vp));
if (vp == NULL || ((vp->u.s = strdup(s)) == NULL)) {
err(3, NULL);
}