diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-02-24 18:09:31 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-02-24 18:09:31 +0000 |
commit | e5bfcba0804aec97eaffc409174ebf4d4fe91cca (patch) | |
tree | 5b25b63fa72c76fa803c05da612b120833bed4dd /sys/netipsec | |
parent | edb8ebb3d4aa8e53f32e1e24b0fb93b1120361f0 (diff) | |
download | FreeBSD-src-e5bfcba0804aec97eaffc409174ebf4d4fe91cca.zip FreeBSD-src-e5bfcba0804aec97eaffc409174ebf4d4fe91cca.tar.gz |
Change the functions to ANSI in those cases where it breaks promotion
to int rule. See ISO C Standard: SS6.7.5.3:15.
Approved by: kib (mentor)
Reviewed by: warner
Tested by: silence on -current
Diffstat (limited to 'sys/netipsec')
-rw-r--r-- | sys/netipsec/key.c | 51 |
1 files changed, 13 insertions, 38 deletions
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 4906999..cf2a474 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -2419,10 +2419,7 @@ key_spddump(so, m, mhp) } static struct mbuf * -key_setdumpsp(sp, type, seq, pid) - struct secpolicy *sp; - u_int8_t type; - u_int32_t seq, pid; +key_setdumpsp(struct secpolicy *sp, u_int8_t type, u_int32_t seq, u_int32_t pid) { struct mbuf *result = NULL, *m; struct seclifetime lt; @@ -3323,10 +3320,8 @@ key_mature(struct secasvar *sav) * subroutine for SADB_GET and SADB_DUMP. */ static struct mbuf * -key_setdumpsa(sav, type, satype, seq, pid) - struct secasvar *sav; - u_int8_t type, satype; - u_int32_t seq, pid; +key_setdumpsa(struct secasvar *sav, u_int8_t type, u_int8_t satype, + u_int32_t seq, u_int32_t pid) { struct mbuf *result = NULL, *tres = NULL, *m; int i; @@ -3464,12 +3459,8 @@ fail: * set data into sadb_msg. */ static struct mbuf * -key_setsadbmsg(type, tlen, satype, seq, pid, reserved) - u_int8_t type, satype; - u_int16_t tlen; - u_int32_t seq; - pid_t pid; - u_int16_t reserved; +key_setsadbmsg(u_int8_t type, u_int16_t tlen, u_int8_t satype, u_int32_t seq, + pid_t pid, u_int16_t reserved) { struct mbuf *m; struct sadb_msg *p; @@ -3544,11 +3535,7 @@ key_setsadbsa(sav) * set data into sadb_address. */ static struct mbuf * -key_setsadbaddr(exttype, saddr, prefixlen, ul_proto) - u_int16_t exttype; - const struct sockaddr *saddr; - u_int8_t prefixlen; - u_int16_t ul_proto; +key_setsadbaddr(u_int16_t exttype, const struct sockaddr *saddr, u_int8_t prefixlen, u_int16_t ul_proto) { struct mbuf *m; struct sadb_address *p; @@ -3595,9 +3582,7 @@ key_setsadbaddr(exttype, saddr, prefixlen, ul_proto) * set data into sadb_x_sa2. */ static struct mbuf * -key_setsadbxsa2(mode, seq, reqid) - u_int8_t mode; - u_int32_t seq, reqid; +key_setsadbxsa2(u_int8_t mode, u_int32_t seq, u_int32_t reqid) { struct mbuf *m; struct sadb_x_sa2 *p; @@ -3629,10 +3614,7 @@ key_setsadbxsa2(mode, seq, reqid) * set data into sadb_x_policy */ static struct mbuf * -key_setsadbxpolicy(type, dir, id) - u_int16_t type; - u_int8_t dir; - u_int32_t id; +key_setsadbxpolicy(u_int16_t type, u_int8_t dir, u_int32_t id) { struct mbuf *m; struct sadb_x_policy *p; @@ -4379,8 +4361,7 @@ key_randomfill(p, l) * 0: invalid satype. */ static u_int16_t -key_satype2proto(satype) - u_int8_t satype; +key_satype2proto(u_int8_t satype) { switch (satype) { case SADB_SATYPE_UNSPEC: @@ -4405,8 +4386,7 @@ key_satype2proto(satype) * 0: invalid protocol type. */ static u_int8_t -key_proto2satype(proto) - u_int16_t proto; +key_proto2satype(u_int16_t proto) { switch (proto) { case IPPROTO_AH: @@ -5271,11 +5251,8 @@ key_delete(so, m, mhp) * delete all SAs for src/dst. Called from key_delete(). */ static int -key_delete_all(so, m, mhp, proto) - struct socket *so; - struct mbuf *m; - const struct sadb_msghdr *mhp; - u_int16_t proto; +key_delete_all(struct socket *so, struct mbuf *m, const struct sadb_msghdr *mhp, + u_int16_t proto) { INIT_VNET_IPSEC(curvnet); struct sadb_address *src0, *dst0; @@ -7310,9 +7287,7 @@ key_sa_routechange(dst) } static void -key_sa_chgstate(sav, state) - struct secasvar *sav; - u_int8_t state; +key_sa_chgstate(struct secasvar *sav, u_int8_t state) { IPSEC_ASSERT(sav != NULL, ("NULL sav")); SAHTREE_LOCK_ASSERT(); |