- u_short -> uint16_t
- KNF a bit
This commit is contained in:
parent
9d8aeaab57
commit
ab4082e001
@ -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
|
* Copyright (c) 1991, 1993
|
||||||
@ -38,7 +38,7 @@
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)dkcksum.c 8.1 (Berkeley) 6/5/93";
|
static char sccsid[] = "@(#)dkcksum.c 8.1 (Berkeley) 6/5/93";
|
||||||
#else
|
#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
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -50,16 +50,16 @@ __RCSID("$NetBSD: dkcksum.c,v 1.11 2005/06/12 19:18:34 dyoung Exp $");
|
|||||||
#endif /* HAVE_NBTOOL_CONFIG_H */
|
#endif /* HAVE_NBTOOL_CONFIG_H */
|
||||||
#include "dkcksum.h"
|
#include "dkcksum.h"
|
||||||
|
|
||||||
u_short
|
uint16_t
|
||||||
dkcksum(struct disklabel *lp)
|
dkcksum(struct disklabel *lp)
|
||||||
{
|
{
|
||||||
u_short *start, *end;
|
uint16_t *start, *end;
|
||||||
u_short sum;
|
uint16_t sum;
|
||||||
|
|
||||||
sum = 0;
|
sum = 0;
|
||||||
start = (u_short *)lp;
|
start = (uint16_t *)lp;
|
||||||
end = (u_short *)&lp->d_partitions[lp->d_npartitions];
|
end = (uint16_t *)&lp->d_partitions[lp->d_npartitions];
|
||||||
while (start < end)
|
while (start < end)
|
||||||
sum ^= *start++;
|
sum ^= *start++;
|
||||||
return (sum);
|
return sum;
|
||||||
}
|
}
|
||||||
|
@ -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 *);
|
||||||
|
Loading…
Reference in New Issue
Block a user