From f7cd7f71ed1501325ece11afa38865c8e3a99683 Mon Sep 17 00:00:00 2001 From: himanshu-17 <56030087+himanshu-17@users.noreply.github.com> Date: Tue, 1 Oct 2019 20:34:30 +0530 Subject: [PATCH] Update 10.8.c --- 10.8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/10.8.c b/10.8.c index 4a745ec..97931a9 100644 --- a/10.8.c +++ b/10.8.c @@ -9,7 +9,7 @@ static jmp_buf env_alrm; int main(void) { - int n; + int s; char line[100]; if (signal(SIGALRM, sig_alrm) == SIG_ERR) { @@ -23,12 +23,12 @@ int main(void) } alarm(10); - if ((n = read(STDIN_FILENO, line, 100)) < 0) { + if ((s = read(STDIN_FILENO, line, 100)) < 0) { printf("read error\n"); } alarm(0); - write(STDOUT_FILENO, line, n); + write(STDOUT_FILENO, line, s); return 0; }