MFC r199188: ANSIfy.

This commit is contained in:
Hajimu UMEMOTO 2009-11-18 14:40:00 +00:00
parent c4511bef96
commit a1a32e5e31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=199478

View File

@ -55,8 +55,7 @@ static void inet6_insert_padopt(u_char *p, int len);
* byte, the length byte, and the option data. * byte, the length byte, and the option data.
*/ */
int int
inet6_option_space(nbytes) inet6_option_space(int nbytes)
int nbytes;
{ {
nbytes += 2; /* we need space for nxt-hdr and length fields */ nbytes += 2; /* we need space for nxt-hdr and length fields */
return(CMSG_SPACE((nbytes + 7) & ~7)); return(CMSG_SPACE((nbytes + 7) & ~7));
@ -68,10 +67,7 @@ inet6_option_space(nbytes)
* success or -1 on an error. * success or -1 on an error.
*/ */
int int
inet6_option_init(bp, cmsgp, type) inet6_option_init(void *bp, struct cmsghdr **cmsgp, int type)
void *bp;
struct cmsghdr **cmsgp;
int type;
{ {
struct cmsghdr *ch = (struct cmsghdr *)bp; struct cmsghdr *ch = (struct cmsghdr *)bp;
@ -98,11 +94,8 @@ inet6_option_init(bp, cmsgp, type)
* earlier. It must have a value between 0 and 7, inclusive. * earlier. It must have a value between 0 and 7, inclusive.
*/ */
int int
inet6_option_append(cmsg, typep, multx, plusy) inet6_option_append(struct cmsghdr *cmsg, const u_int8_t *typep, int multx,
struct cmsghdr *cmsg; int plusy)
const u_int8_t *typep;
int multx;
int plusy;
{ {
int padlen, optlen, off; int padlen, optlen, off;
u_char *bp = (u_char *)cmsg + cmsg->cmsg_len; u_char *bp = (u_char *)cmsg + cmsg->cmsg_len;
@ -171,11 +164,7 @@ inet6_option_append(cmsg, typep, multx, plusy)
* *
*/ */
u_int8_t * u_int8_t *
inet6_option_alloc(cmsg, datalen, multx, plusy) inet6_option_alloc(struct cmsghdr *cmsg, int datalen, int multx, int plusy)
struct cmsghdr *cmsg;
int datalen;
int multx;
int plusy;
{ {
int padlen, off; int padlen, off;
u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len; u_int8_t *bp = (u_char *)cmsg + cmsg->cmsg_len;
@ -238,9 +227,7 @@ inet6_option_alloc(cmsg, datalen, multx, plusy)
* (RFC 2292, 6.3.5) * (RFC 2292, 6.3.5)
*/ */
int int
inet6_option_next(cmsg, tptrp) inet6_option_next(const struct cmsghdr *cmsg, u_int8_t **tptrp)
const struct cmsghdr *cmsg;
u_int8_t **tptrp;
{ {
struct ip6_ext *ip6e; struct ip6_ext *ip6e;
int hdrlen, optlen; int hdrlen, optlen;
@ -296,10 +283,7 @@ inet6_option_next(cmsg, tptrp)
* it's a typo. The variable should be type of u_int8_t **. * it's a typo. The variable should be type of u_int8_t **.
*/ */
int int
inet6_option_find(cmsg, tptrp, type) inet6_option_find(const struct cmsghdr *cmsg, u_int8_t **tptrp, int type)
const struct cmsghdr *cmsg;
u_int8_t **tptrp;
int type;
{ {
struct ip6_ext *ip6e; struct ip6_ext *ip6e;
int hdrlen, optlen; int hdrlen, optlen;
@ -352,8 +336,7 @@ inet6_option_find(cmsg, tptrp, type)
* calculated length and the limitation of the buffer. * calculated length and the limitation of the buffer.
*/ */
static int static int
ip6optlen(opt, lim) ip6optlen(u_int8_t *opt, u_int8_t *lim)
u_int8_t *opt, *lim;
{ {
int optlen; int optlen;