[PATCH] read returns a ssize_t.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 misc-utils/script.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/misc-utils/script.c b/misc-utils/script.c
index 5f56f50..e166291 100644
--- a/misc-utils/script.c
+++ b/misc-utils/script.c
@@ -286,7 +286,7 @@ my_strftime(char *buf, size_t len, const char *fmt, const struct tm *tm) {
 
 void
 dooutput() {
-	register int cc;
+	register ssize_t cc;
 	time_t tvec;
 	char obuf[BUFSIZ];
 	struct timeval tv;
@@ -338,7 +338,8 @@ dooutput() {
 			break;
 		if (tflg) {
 			newtime = tv.tv_sec + (double) tv.tv_usec / 1000000;
-			fprintf(stderr, "%f %i\n", newtime - oldtime, cc);
+			fprintf(stderr, "%f %lu\n", newtime - oldtime,
+				(unsigned long)cc);
 			oldtime = newtime;
 		}
 		wrt = write(1, obuf, cc);
-- 
1.5.3.8

--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux