From 07cd9a8d1563ddc8627f762e67fffae95fd6ab30 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 9 Jan 1994 03:47:21 +0000 Subject: safe_read and full_write + join patch --- src/sum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sum.c') diff --git a/src/sum.c b/src/sum.c index 67527e142..62fd30e92 100644 --- a/src/sum.c +++ b/src/sum.c @@ -40,6 +40,7 @@ static int bsd_sum_file (); static int sysv_sum_file (); void error (); +int safe_read (); /* The name this program was run with. */ char *program_name; @@ -242,7 +243,7 @@ sysv_sum_file (file, print_name) } } - while ((bytes_read = read (fd, buf, sizeof buf)) > 0) + while ((bytes_read = safe_read (fd, buf, sizeof buf)) > 0) { register int i; -- cgit v1.2.3-54-g00ecf