Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/mtree ANSIfy function declaration, remove register ...



details:   https://anonhg.NetBSD.org/src/rev/d4bbc220c0ef
branches:  trunk
changeset: 573723:d4bbc220c0ef
user:      perry <perry%NetBSD.org@localhost>
date:      Sun Feb 06 04:52:53 2005 +0000

description:
ANSIfy function declaration, remove register declarations, and some
minor KNFing.

diffstat:

 usr.sbin/mtree/crc.c |  20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diffs (54 lines):

diff -r 5e34083ef49c -r d4bbc220c0ef usr.sbin/mtree/crc.c
--- a/usr.sbin/mtree/crc.c      Sun Feb 06 04:48:58 2005 +0000
+++ b/usr.sbin/mtree/crc.c      Sun Feb 06 04:52:53 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crc.c,v 1.6 2004/06/20 22:20:18 jmc Exp $      */
+/*     $NetBSD: crc.c,v 1.7 2005/02/06 04:52:53 perry Exp $    */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)crc.c      8.1 (Berkeley) 6/17/93";
 #else
-__RCSID("$NetBSD: crc.c,v 1.6 2004/06/20 22:20:18 jmc Exp $");
+__RCSID("$NetBSD: crc.c,v 1.7 2005/02/06 04:52:53 perry Exp $");
 #endif
 #endif /* not lint */
 
@@ -118,14 +118,12 @@
 u_int32_t crc_total = ~0;              /* The crc over a number of files. */
 
 int
-crc(fd, cval, clen)
-       register int fd;
-       u_int32_t *cval, *clen;
+crc(int fd, u_int32_t *cval, u_int32_t *clen)
 {
-       register u_char *p;
-       register int nr;
-       register u_int32_t thecrc, len;
-       register u_int32_t crctot;
+       u_char *p;
+       int nr;
+       u_int32_t thecrc, len;
+       u_int32_t crctot;
        u_char buf[16 * 1024];
 
 #define        COMPUTE(var, ch)        (var) = (var) << 8 ^ crctab[(var) >> 24 ^ (ch)]
@@ -144,7 +142,7 @@
                                COMPUTE(thecrc, *p);
                }
        if (nr < 0)
-               return (1);
+               return 1;
 
        *clen = len;
 
@@ -162,5 +160,5 @@
        *cval = ~thecrc;
        if (sflag)
                crc_total = ~crctot;
-       return (0);
+       return 0;
 }



Home | Main Index | Thread Index | Old Index