Source-Changes-HG archive

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

[src/netbsd-1-6]: src/usr.bin/cksum Pull up revision 1.9 (requested by kleink...



details:   https://anonhg.NetBSD.org/src/rev/fddd21282a32
branches:  netbsd-1-6
changeset: 531034:fddd21282a32
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Dec 21 08:13:15 2003 +0000

description:
Pull up revision 1.9 (requested by kleink in ticket #1580):
Update to keep file lengths in appropriate data types (off_t, as opposed
to u_int32_t).

diffstat:

 usr.bin/cksum/print.c |  23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diffs (61 lines):

diff -r 7480d8261ecd -r fddd21282a32 usr.bin/cksum/print.c
--- a/usr.bin/cksum/print.c     Thu Dec 18 08:26:37 2003 +0000
+++ b/usr.bin/cksum/print.c     Sun Dec 21 08:13:15 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print.c,v 1.7 2002/03/31 14:43:22 bjh21 Exp $  */
+/*     $NetBSD: print.c,v 1.7.2.1 2003/12/21 08:13:15 tron Exp $       */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)print.c    8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: print.c,v 1.7 2002/03/31 14:43:22 bjh21 Exp $");
+__RCSID("$NetBSD: print.c,v 1.7.2.1 2003/12/21 08:13:15 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -49,9 +49,10 @@
 void
 pcrc(fn, val, len)
        char *fn;
-       u_int32_t val, len;
+       u_int32_t val;
+       off_t len;
 {
-       (void)printf("%lu %lu", (unsigned long)val, (unsigned long)len);
+       (void)printf("%lu %lld", (unsigned long)val, (long long)len);
        if (fn)
                (void)printf(" %s", fn);
        (void)printf("\n");
@@ -60,10 +61,11 @@
 void
 psum1(fn, val, len)
        char *fn;
-       u_int32_t val, len;
+       u_int32_t val;
+       off_t len;
 {
-       (void)printf("%lu %lu", (unsigned long)val,
-           (unsigned long)(len + 1023) / 1024);
+       (void)printf("%lu %lld", (unsigned long)val,
+           (long long)(len + 1023) / 1024);
        if (fn)
                (void)printf(" %s", fn);
        (void)printf("\n");
@@ -72,10 +74,11 @@
 void
 psum2(fn, val, len)
        char *fn;
-       u_int32_t val, len;
+       u_int32_t val;
+       off_t len;
 {
-       (void)printf("%lu %lu", (unsigned long)val,
-           (unsigned long)(len + 511) / 512);
+       (void)printf("%lu %lld", (unsigned long)val,
+           (long long)(len + 511) / 512);
        if (fn)
                (void)printf(" %s", fn);
        (void)printf("\n");



Home | Main Index | Thread Index | Old Index