diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2008-09-01 04:56:33 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2008-09-01 04:56:33 +0000 |
commit | 42e10fa24f384e81a1551e7aef284d1e53b785c9 (patch) | |
tree | 8756ca4e5a71a734a2552b1fa714be7e6b1f7a1f /cpukit/libnetworking/net/radix.c | |
parent | Stop using old-style function definitions. (diff) | |
download | rtems-42e10fa24f384e81a1551e7aef284d1e53b785c9.tar.bz2 |
Stop using old-style function definitions.
Diffstat (limited to 'cpukit/libnetworking/net/radix.c')
-rw-r--r-- | cpukit/libnetworking/net/radix.c | 75 |
1 files changed, 20 insertions, 55 deletions
diff --git a/cpukit/libnetworking/net/radix.c b/cpukit/libnetworking/net/radix.c index 8a98c42d1f..69eff3a4ac 100644 --- a/cpukit/libnetworking/net/radix.c +++ b/cpukit/libnetworking/net/radix.c @@ -111,9 +111,7 @@ static int rn_satisfies_leaf(char *trial, struct radix_node *leaf, */ static struct radix_node * -rn_search(v_arg, head) - void *v_arg; - struct radix_node *head; +rn_search(void *v_arg, struct radix_node *head) { register struct radix_node *x; register caddr_t v; @@ -128,9 +126,7 @@ rn_search(v_arg, head) } static struct radix_node * -rn_search_m(v_arg, head, m_arg) - struct radix_node *head; - void *v_arg, *m_arg; +rn_search_m(void *v_arg, struct radix_node *head, void *m_arg) { register struct radix_node *x; register caddr_t v = v_arg, m = m_arg; @@ -146,8 +142,7 @@ rn_search_m(v_arg, head, m_arg) } int -rn_refines(m_arg, n_arg) - void *m_arg, *n_arg; +rn_refines(void *m_arg, void *n_arg) { register caddr_t m = m_arg, n = n_arg; register caddr_t lim, lim2 = lim = n + *(u_char *)n; @@ -173,9 +168,7 @@ rn_refines(m_arg, n_arg) } struct radix_node * -rn_lookup(v_arg, m_arg, head) - void *v_arg, *m_arg; - struct radix_node_head *head; +rn_lookup(void *v_arg, void *m_arg, struct radix_node_head *head) { register struct radix_node *x; caddr_t netmask = 0; @@ -195,10 +188,7 @@ rn_lookup(v_arg, m_arg, head) } static int -rn_satisfies_leaf(trial, leaf, skip) - char *trial; - register struct radix_node *leaf; - int skip; +rn_satisfies_leaf(char *trial, struct radix_node *leaf, int skip) { register char *cp = trial, *cp2 = leaf->rn_key, *cp3 = leaf->rn_mask; char *cplim; @@ -216,9 +206,7 @@ rn_satisfies_leaf(trial, leaf, skip) } struct radix_node * -rn_match(v_arg, head) - void *v_arg; - struct radix_node_head *head; +rn_match(void *v_arg, struct radix_node_head *head) { caddr_t v = v_arg; register struct radix_node *t = head->rnh_treetop, *x; @@ -328,10 +316,7 @@ int rn_debug = 1; #endif static struct radix_node * -rn_newpair(v, b, nodes) - void *v; - int b; - struct radix_node nodes[2]; +rn_newpair(void *v, int b, struct radix_node nodes[2]) { register struct radix_node *tt = nodes, *t = tt + 1; t->rn_bit = b; @@ -352,11 +337,8 @@ rn_newpair(v, b, nodes) } static struct radix_node * -rn_insert(v_arg, head, dupentry, nodes) - void *v_arg; - struct radix_node_head *head; - int *dupentry; - struct radix_node nodes[2]; +rn_insert(void *v_arg, struct radix_node_head *head, int *dupentry, + struct radix_node nodes[2]) { caddr_t v = v_arg; struct radix_node *top = head->rnh_treetop; @@ -422,9 +404,7 @@ on1: } struct radix_node * -rn_addmask(n_arg, search, skip) - int search, skip; - void *n_arg; +rn_addmask(void *n_arg, int search, int skip) { caddr_t netmask = (caddr_t)n_arg; register struct radix_node *x; @@ -495,8 +475,7 @@ rn_addmask(n_arg, search, skip) } static int /* XXX: arbitrary ordering for non-contiguous masks */ -rn_lexobetter(m_arg, n_arg) - void *m_arg, *n_arg; +rn_lexobetter(void *m_arg, void *n_arg) { register u_char *mp = m_arg, *np = n_arg, *lim; @@ -510,9 +489,7 @@ rn_lexobetter(m_arg, n_arg) } static struct radix_mask * -rn_new_radix_mask(tt, next) - register struct radix_node *tt; - register struct radix_mask *next; +rn_new_radix_mask(struct radix_node *tt, struct radix_mask *next) { register struct radix_mask *m; @@ -534,10 +511,8 @@ rn_new_radix_mask(tt, next) } struct radix_node * -rn_addroute(v_arg, n_arg, head, treenodes) - void *v_arg, *n_arg; - struct radix_node_head *head; - struct radix_node treenodes[2]; +rn_addroute(void *v_arg, void *n_arg, struct radix_node_head *head, + struct radix_node treenodes[2]) { caddr_t v = (caddr_t)v_arg, netmask = (caddr_t)n_arg; register struct radix_node *t, *x = 0, *tt; @@ -692,9 +667,7 @@ on2: } struct radix_node * -rn_delete(v_arg, netmask_arg, head) - void *v_arg, *netmask_arg; - struct radix_node_head *head; +rn_delete(void *v_arg, void *netmask_arg, struct radix_node_head *head) { register struct radix_node *t, *p, *x, *tt; struct radix_mask *m, *saved_m, **mp; @@ -881,11 +854,8 @@ out: * exit. */ static int -rn_walktree_from(h, a, m, f, w) - struct radix_node_head *h; - void *a, *m; - walktree_f_t *f; - void *w; +rn_walktree_from(struct radix_node_head *h, void *a, void *m, + walktree_f_t *f, void *w) { int error; struct radix_node *base, *next; @@ -972,10 +942,7 @@ rn_walktree_from(h, a, m, f, w) } static int -rn_walktree(h, f, w) - struct radix_node_head *h; - walktree_f_t *f; - void *w; +rn_walktree(struct radix_node_head *h, walktree_f_t *f, void *w) { int error; struct radix_node *base, *next; @@ -1013,9 +980,7 @@ rn_walktree(h, f, w) } int -rn_inithead(head, off) - void **head; - int off; +rn_inithead(void **head, int off) { register struct radix_node_head *rnh; register struct radix_node *t, *tt, *ttt; @@ -1046,7 +1011,7 @@ rn_inithead(head, off) } void -rn_init() +rn_init(void) { char *cp, *cplim; #ifdef _KERNEL |