summaryrefslogtreecommitdiffstats
path: root/usr.bin/paste/paste.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/paste/paste.c')
-rw-r--r--usr.bin/paste/paste.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c
index a910a36..ea75288 100644
--- a/usr.bin/paste/paste.c
+++ b/usr.bin/paste/paste.c
@@ -122,8 +122,8 @@ parallel(char **argv)
char buf[_POSIX2_LINE_MAX + 1];
for (cnt = 0, head = NULL; (p = *argv); ++argv, ++cnt) {
- if (!(lp = (LIST *)malloc((u_int)sizeof(LIST))))
- errx(1, "%s", strerror(ENOMEM));
+ if ((lp = malloc(sizeof(LIST))) == NULL)
+ err(1, NULL);
if (p[0] == '-' && !p[1])
lp->fp = stdin;
else if (!(lp->fp = fopen(p, "r")))
OpenPOWER on IntegriCloud