summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorVincent Labrecque <vincent@cvs.openbsd.org>2003-11-14 22:41:34 +0000
committerVincent Labrecque <vincent@cvs.openbsd.org>2003-11-14 22:41:34 +0000
commit5ba8277c8e49828b1f7f2f34769443a2f3382a6f (patch)
treeee1ea1302c2b5b239617cec5291547e2f56fa605 /usr.bin
parentb5cae4c14b4acf4372b11546b6b03a39efac15cf (diff)
read(2) returns ssize_t, not size_t. spotted by Andrey Matveev.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mg/fileio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mg/fileio.c b/usr.bin/mg/fileio.c
index f5039e37f2a..02762b8ac8b 100644
--- a/usr.bin/mg/fileio.c
+++ b/usr.bin/mg/fileio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fileio.c,v 1.39 2003/11/08 19:17:29 jmc Exp $ */
+/* $OpenBSD: fileio.c,v 1.40 2003/11/14 22:41:33 vincent Exp $ */
/*
* POSIX fileio.c
@@ -165,7 +165,7 @@ fbackupfile(const char *fn)
{
struct stat sb;
int from, to, serrno;
- size_t nread;
+ ssize_t nread;
char buf[BUFSIZ];
char *nname;
@@ -194,8 +194,8 @@ fbackupfile(const char *fn)
}
while ((nread = read(from, buf, sizeof(buf))) > 0) {
if (write(to, buf, nread) != nread) {
- nread = -1;
- break;
+ nread = -1;
+ break;
}
}
serrno = errno;