summaryrefslogtreecommitdiff
path: root/src/sum.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-01-09 03:47:21 +0000
committerJim Meyering <jim@meyering.net>1994-01-09 03:47:21 +0000
commit07cd9a8d1563ddc8627f762e67fffae95fd6ab30 (patch)
tree3ea6f2c5b82f78d41db79729b21986848d6e4e3a /src/sum.c
parent4f90578a4f0cdb2e9f708d924dd67e6a5b9cd289 (diff)
downloadcoreutils-07cd9a8d1563ddc8627f762e67fffae95fd6ab30.tar.xz
safe_read and full_write + join patch
Diffstat (limited to 'src/sum.c')
-rw-r--r--src/sum.c3
1 files changed, 2 insertions, 1 deletions
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;