From 307a7436ec468f504b825de01e11d4698bd07d52 Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Fri, 17 May 2002 02:28:46 +0000 Subject: [PATCH] Remove spurious casts in malloc(3)'s argument. Use `return' instead of `exit' at the bottom of main(). --- usr.bin/tee/tee.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/tee/tee.c b/usr.bin/tee/tee.c index 30f919fa06d..e77ec6d1903 100644 --- a/usr.bin/tee/tee.c +++ b/usr.bin/tee/tee.c @@ -93,7 +93,7 @@ main(argc, argv) argv += optind; argc -= optind; - if ((buf = malloc((u_int)BSIZE)) == NULL) + if ((buf = malloc(BSIZE)) == NULL) errx(1, "malloc"); add(STDOUT_FILENO, "stdout"); @@ -121,7 +121,7 @@ main(argc, argv) } if (rval < 0) err(1, "read"); - exit(exitval); + return (exitval); } static void @@ -138,7 +138,7 @@ add(fd, name) { LIST *p; - if ((p = malloc((u_int)sizeof(LIST))) == NULL) + if ((p = malloc(sizeof(LIST))) == NULL) errx(1, "malloc"); p->fd = fd; p->name = name;