From 5ba8277c8e49828b1f7f2f34769443a2f3382a6f Mon Sep 17 00:00:00 2001
From: Vincent Labrecque <vincent@cvs.openbsd.org>
Date: Fri, 14 Nov 2003 22:41:34 +0000
Subject: read(2) returns ssize_t, not size_t.  spotted by Andrey Matveev.

---
 usr.bin/mg/fileio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'usr.bin')

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;
-- 
cgit v1.2.3