diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-05-17 02:28:46 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-05-17 02:28:46 +0000 |
commit | 35c92f131c2137589b87461b838bfd20b5f27d00 (patch) | |
tree | 6ca249fb7df387586dfd8d3255185b6d1be5cca3 /usr.bin/tee | |
parent | 224e5ccc850a9db1b7be27a37971e2af056ffd00 (diff) | |
download | FreeBSD-src-35c92f131c2137589b87461b838bfd20b5f27d00.zip FreeBSD-src-35c92f131c2137589b87461b838bfd20b5f27d00.tar.gz |
Remove spurious casts in malloc(3)'s argument.
Use `return' instead of `exit' at the bottom of main().
Diffstat (limited to 'usr.bin/tee')
-rw-r--r-- | usr.bin/tee/tee.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tee/tee.c b/usr.bin/tee/tee.c index 30f919f..e77ec6d 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; |