Source-Changes-HG archive

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

[src/trunk]: src/sbin/disklabel - u_short -> uint16_t



details:   https://anonhg.NetBSD.org/src/rev/73f59ea68c8b
branches:  trunk
changeset: 748467:73f59ea68c8b
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Oct 24 18:15:45 2009 +0000

description:
- u_short -> uint16_t
- KNF a bit

diffstat:

 sbin/disklabel/dkcksum.c |  16 ++++++++--------
 sbin/disklabel/dkcksum.h |   4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diffs (50 lines):

diff -r add40d2d7bd7 -r 73f59ea68c8b sbin/disklabel/dkcksum.c
--- a/sbin/disklabel/dkcksum.c  Sat Oct 24 17:49:58 2009 +0000
+++ b/sbin/disklabel/dkcksum.c  Sat Oct 24 18:15:45 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dkcksum.c,v 1.11 2005/06/12 19:18:34 dyoung Exp $      */
+/*     $NetBSD: dkcksum.c,v 1.12 2009/10/24 18:15:45 tsutsui Exp $     */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)dkcksum.c  8.1 (Berkeley) 6/5/93";
 #else
-__RCSID("$NetBSD: dkcksum.c,v 1.11 2005/06/12 19:18:34 dyoung Exp $");
+__RCSID("$NetBSD: dkcksum.c,v 1.12 2009/10/24 18:15:45 tsutsui Exp $");
 #endif
 #endif /* not lint */
 
@@ -50,16 +50,16 @@
 #endif /* HAVE_NBTOOL_CONFIG_H */
 #include "dkcksum.h"
 
-u_short
+uint16_t
 dkcksum(struct disklabel *lp)
 {
-       u_short *start, *end;
-       u_short  sum;
+       uint16_t *start, *end;
+       uint16_t sum;
 
        sum = 0;
-       start = (u_short *)lp;
-       end = (u_short *)&lp->d_partitions[lp->d_npartitions];
+       start = (uint16_t *)lp;
+       end = (uint16_t *)&lp->d_partitions[lp->d_npartitions];
        while (start < end)
                sum ^= *start++;
-       return (sum);
+       return sum;
 }
diff -r add40d2d7bd7 -r 73f59ea68c8b sbin/disklabel/dkcksum.h
--- a/sbin/disklabel/dkcksum.h  Sat Oct 24 17:49:58 2009 +0000
+++ b/sbin/disklabel/dkcksum.h  Sat Oct 24 18:15:45 2009 +0000
@@ -1,3 +1,3 @@
-/*     $NetBSD: dkcksum.h,v 1.3 2000/12/24 05:59:11 lukem Exp $        */
+/*     $NetBSD: dkcksum.h,v 1.4 2009/10/24 18:15:45 tsutsui Exp $      */
 
-u_short        dkcksum(struct disklabel *);
+uint16_t       dkcksum(struct disklabel *);



Home | Main Index | Thread Index | Old Index