diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-01-12 13:18:08 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-01-12 13:18:08 +0000 |
commit | 751716e05082eecdf3a7767ec11dabf0062f9776 (patch) | |
tree | d0a01290f16dfbc5c03f21f3e84d7836d7de5066 /sys/netatalk/at_rmx.c | |
parent | ccc086813d94233b2bd97bad22ddd8017def360d (diff) | |
download | FreeBSD-src-751716e05082eecdf3a7767ec11dabf0062f9776.zip FreeBSD-src-751716e05082eecdf3a7767ec11dabf0062f9776.tar.gz |
Cleanup of netatalk atalk layer includes, protocol definitions, and
routing:
- style(9) cleanup -- white space, braces, etc.
- Make include guards consistent with our more general naming
convention.
- Rearrange and complete forward structure declarations in at_extern.h,
remove testing of guards of various other include files to protect
function declarations.
This leaves an ifdef _KERNEL in at_var.h, but from inspection it seems
likely that this file is not actually safe for inclusion in user space
still. However, since it's not included from within src/ so this does
not appear to be an issue (ifconfig, etc, have migrated to the generic
cross-protocol ioctls for address operations).
Diffstat (limited to 'sys/netatalk/at_rmx.c')
-rw-r--r-- | sys/netatalk/at_rmx.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/netatalk/at_rmx.c b/sys/netatalk/at_rmx.c index 39c2a2d..b39f980 100644 --- a/sys/netatalk/at_rmx.c +++ b/sys/netatalk/at_rmx.c @@ -30,7 +30,7 @@ * $FreeBSD$ */ -/* This code generates debugging traces to the radix code */ +/* This code generates debugging traces to the radix code. */ #include <sys/param.h> #include <sys/systm.h> @@ -38,7 +38,7 @@ #include <net/route.h> -int at_inithead(void **head, int off); +int at_inithead(void **head, int off); #define HEXBUF_LEN 256 @@ -55,13 +55,13 @@ prsockaddr(void *v, char *hexbuf) /* return: "(len) hexdump" */ bp += sprintf(bp, "(%d)", len); - for (cp++; cp < cplim && bp < hexbuf + (HEXBUF_LEN - 4); cp++) { + for (cp++; cp < cplim && bp < hexbuf + (HEXBUF_LEN - 4); + cp++) { *bp++ = "0123456789abcdef"[*cp / 16]; *bp++ = "0123456789abcdef"[*cp % 16]; } - } else { + } else bp+= sprintf(bp, "null"); - } *bp = '\0'; return (hexbuf); } @@ -75,14 +75,14 @@ at_addroute(void *v_arg, void *n_arg, struct radix_node_head *head, printf("at_addroute: v=%s\n", prsockaddr(v_arg, hexbuf)); printf("at_addroute: n=%s\n", prsockaddr(n_arg, hexbuf)); - printf("at_addroute: head=%p treenodes=%p\n", - (void *)head, (void *)treenodes); + printf("at_addroute: head=%p treenodes=%p\n", (void *)head, + (void *)treenodes); rn = rn_addroute(v_arg, n_arg, head, treenodes); printf("at_addroute: returns rn=%p\n", (void *)rn); - return rn; + return (rn); } static struct radix_node * @@ -98,7 +98,7 @@ at_matroute(void *v_arg, struct radix_node_head *head) printf("at_matroute: returnr rn=%p\n", (void *)rn); - return rn; + return (rn); } static struct radix_node * @@ -115,10 +115,10 @@ at_lookup(void *v_arg, void *m_arg, struct radix_node_head *head) printf("at_lookup: returns rn=%p\n", (void *)rn); - return rn; + return (rn); } -static struct radix_node * +static struct radix_node * at_delroute(void *v_arg, void *netmask_arg, struct radix_node_head *head) { struct radix_node *rn; @@ -132,7 +132,7 @@ at_delroute(void *v_arg, void *netmask_arg, struct radix_node_head *head) printf("at_delroute: returns rn=%p\n", (void *)rn); - return rn; + return (rn); } /* @@ -143,13 +143,13 @@ at_inithead(void **head, int off) { struct radix_node_head *rnh; - if(!rn_inithead(head, off)) - return 0; + if (!rn_inithead(head, off)) + return (0); rnh = *head; rnh->rnh_addaddr = at_addroute; rnh->rnh_deladdr = at_delroute; rnh->rnh_matchaddr = at_matroute; rnh->rnh_lookup = at_lookup; - return 1; + return (1); } |