summaryrefslogtreecommitdiffstats
path: root/usr.bin/awk/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/awk/parse.c')
-rw-r--r--usr.bin/awk/parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/awk/parse.c b/usr.bin/awk/parse.c
index 9060384027c..0394da3a7e8 100644
--- a/usr.bin/awk/parse.c
+++ b/usr.bin/awk/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.8 2020/06/10 21:02:33 millert Exp $ */
+/* $OpenBSD: parse.c,v 1.9 2020/06/10 21:03:36 millert Exp $ */
/****************************************************************
Copyright (C) Lucent Technologies 1997
All Rights Reserved
@@ -34,7 +34,7 @@ Node *nodealloc(int n)
{
Node *x;
- x = (Node *) malloc(sizeof(Node) + (n-1)*sizeof(Node *));
+ x = malloc(sizeof(*x) + (n-1) * sizeof(x));
if (x == NULL)
FATAL("out of space in nodealloc");
x->nnext = NULL;