From 3134fad324dee63431db43cf9fc82072cb004770 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 4 Oct 1993 21:20:37 +0000 Subject: merge with 1.8.1a --- src/tee.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/tee.c') diff --git a/src/tee.c b/src/tee.c index b97821c8d..941507fec 100644 --- a/src/tee.c +++ b/src/tee.c @@ -77,23 +77,23 @@ Usage: %s [-ai] [--append] [--ignore-interrupts] [file...]\n", } if (ignore_interrupts) -#ifdef _POSIX_VERSION { +#ifdef _POSIX_VERSION struct sigaction sigact; sigact.sa_handler = SIG_IGN; sigemptyset (&sigact.sa_mask); sigact.sa_flags = 0; sigaction (SIGINT, &sigact, NULL); - } #else /* !_POSIX_VERSION */ - signal (SIGINT, SIG_IGN); + signal (SIGINT, SIG_IGN); #endif /* _POSIX_VERSION */ + } errs = tee (argc - optind, &argv[optind]); - if (close (0) == -1) + if (close (0) != 0) error (1, errno, "standard input"); - if (close (1) == -1) + if (close (1) != 0) error (1, errno, "standard output"); exit (errs); } @@ -143,7 +143,7 @@ tee (nfiles, files) } for (i = 0; i < nfiles; i++) - if (descriptors[i] != -1 && close (descriptors[i]) == -1) + if (descriptors[i] != -1 && close (descriptors[i]) != 0) { error (0, errno, "%s", files[i]); ret = 1; -- cgit v1.2.3-70-g09d2