]> err.no Git - util-linux/commitdiff
script: read returns a size_t
authorJames Youngman <jay@gnu.org>
Sun, 6 Apr 2008 22:19:53 +0000 (23:19 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 7 Apr 2008 23:44:51 +0000 (01:44 +0200)
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/script.c

index 5f56f505e5155b394ca8cf0ec888e11edc00a58d..fc54fcef7995bb11c00a8443c3c3fa3663f563f8 100644 (file)
@@ -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,7 @@ dooutput() {
                        break;
                if (tflg) {
                        newtime = tv.tv_sec + (double) tv.tv_usec / 1000000;
-                       fprintf(stderr, "%f %i\n", newtime - oldtime, cc);
+                       fprintf(stderr, "%f %zd\n", newtime - oldtime, cc);
                        oldtime = newtime;
                }
                wrt = write(1, obuf, cc);