Use ANSI prototype and function definition for dkcksum so that this

file can be included with C++ again.  This appears to have been broken
in 1.54 with the introduction of it as an inline function.
This commit is contained in:
Warner Losh 2001-01-14 05:14:37 +00:00
parent 8b9e25b64c
commit 2fedd05ce9
3 changed files with 6 additions and 9 deletions

View File

@ -176,11 +176,10 @@ struct disklabel {
} d_partitions[MAXPARTITIONS]; /* actually may be more */
};
static u_int16_t dkcksum __P((struct disklabel *lp));
static u_int16_t dkcksum(struct disklabel *lp);
static __inline u_int16_t
dkcksum(lp)
struct disklabel *lp;
dkcksum(struct disklabel *lp)
{
u_int16_t *start, *end;
u_int16_t sum = 0;

View File

@ -176,11 +176,10 @@ struct disklabel {
} d_partitions[MAXPARTITIONS]; /* actually may be more */
};
static u_int16_t dkcksum __P((struct disklabel *lp));
static u_int16_t dkcksum(struct disklabel *lp);
static __inline u_int16_t
dkcksum(lp)
struct disklabel *lp;
dkcksum(struct disklabel *lp)
{
u_int16_t *start, *end;
u_int16_t sum = 0;

View File

@ -176,11 +176,10 @@ struct disklabel {
} d_partitions[MAXPARTITIONS]; /* actually may be more */
};
static u_int16_t dkcksum __P((struct disklabel *lp));
static u_int16_t dkcksum(struct disklabel *lp);
static __inline u_int16_t
dkcksum(lp)
struct disklabel *lp;
dkcksum(struct disklabel *lp)
{
u_int16_t *start, *end;
u_int16_t sum = 0;