diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-02-10 08:25:06 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-02-10 08:25:06 +0000 |
commit | 0d37bf16e5539e893839d97dea67f97c35405a4c (patch) | |
tree | 5a86ed9a8fd7387cc3957a82980cdcf40e442b19 /cpukit/libnetworking | |
parent | Remove struct file (Unused). (diff) | |
download | rtems-0d37bf16e5539e893839d97dea67f97c35405a4c.tar.bz2 |
Cosmetics from FreeBSD.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r-- | cpukit/libnetworking/nfs/bootp_subr.c | 72 | ||||
-rw-r--r-- | cpukit/libnetworking/nfsclient/nfsdiskless.h | 4 |
2 files changed, 29 insertions, 47 deletions
diff --git a/cpukit/libnetworking/nfs/bootp_subr.c b/cpukit/libnetworking/nfs/bootp_subr.c index 3cca435a72..4e8fc94d76 100644 --- a/cpukit/libnetworking/nfs/bootp_subr.c +++ b/cpukit/libnetworking/nfs/bootp_subr.c @@ -130,7 +130,7 @@ static int xdr_int_decode(struct mbuf **ptr,int *iptr); static void printip(char *prefix,struct in_addr addr); #ifdef BOOTP_DEBUG -void bootpboot_p_sa(struct sockaddr *sa,struct sockaddr *ma); +void bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma); void bootpboot_p_ma(struct sockaddr *ma); void bootpboot_p_rtentry(struct rtentry *rt); void bootpboot_p_tree(struct radix_node *rn); @@ -155,11 +155,11 @@ bootpc_adjust_interface(struct ifreq *ireq,struct socket *so, void bootpc_init(int update_files); #ifdef BOOTP_DEBUG -void bootpboot_p_sa(sa,ma) - struct sockaddr *sa; - struct sockaddr *ma; +void +bootpboot_p_sa(struct sockaddr *sa, struct sockaddr *ma) { - if (!sa) { + + if (sa == NULL) { printf("(sockaddr *) <null>"); return; } @@ -187,37 +187,41 @@ void bootpboot_p_sa(sa,ma) } break; default: - printf("af%d",sa->sa_family); + printf("af%d",sa->sa_family); } } -void bootpboot_p_ma(ma) - struct sockaddr *ma; +void +bootpboot_p_ma(struct sockaddr *ma) { - if (!ma) { + + if (ma == NULL) { printf("<null>"); return; } - printf("%x",*(int*)ma); + printf("%x", *(int*)ma); } -void bootpboot_p_rtentry(rt) - struct rtentry *rt; +void +bootpboot_p_rtentry(struct rtentry *rt) { - bootpboot_p_sa(rt_key(rt),rt_mask(rt)); + + bootpboot_p_sa(rt_key(rt), rt_mask(rt)); printf(" "); bootpboot_p_ma(rt->rt_genmask); printf(" "); - bootpboot_p_sa(rt->rt_gateway,NULL); + bootpboot_p_sa(rt->rt_gateway, NULL); printf(" "); - printf("flags %x",(unsigned short) rt->rt_flags); - printf(" %d",rt->rt_rmx.rmx_expire); - printf(" %s%d\n",rt->rt_ifp->if_name,rt->rt_ifp->if_unit); + printf("flags %x", (unsigned short) rt->rt_flags); + printf(" %d", rt->rt_rmx.rmx_expire); + printf(" %s%d\n", rt->rt_ifp->if_name,rt->rt_ifp->if_unit); } -void bootpboot_p_tree(rn) - struct radix_node *rn; + +void +bootpboot_p_tree(struct radix_node *rn) { - while (rn) { + + while (rn != NULL) { if (rn->rn_b < 0) { if (rn->rn_flags & RNF_ROOT) { } else { @@ -233,13 +237,16 @@ void bootpboot_p_tree(rn) } } -void bootpboot_p_rtlist(void) +void +bootpboot_p_rtlist(void) { + printf("Routing table:\n"); bootpboot_p_tree(rt_tables[AF_INET]->rnh_treetop); } -void bootpboot_p_iflist(void) +void +bootpboot_p_iflist(void) { struct ifnet *ifp; struct ifaddr *ifa; @@ -705,27 +712,6 @@ getdec(char **ptr) } #endif -#if !defined(__rtems__) -static char * -substr(char *a, char *b) -{ - char *loc1; - char *loc2; - - while (*a != '\0') { - loc1 = a; - loc2 = b; - while (*loc1 == *loc2++) { - if (*loc1 == '\0') return (0); - loc1++; - if (*loc2 == '\0') return (loc1); - } - a++; - } - return (0); -} -#endif - static void printip(char *prefix,struct in_addr addr) { uint32_t ip; diff --git a/cpukit/libnetworking/nfsclient/nfsdiskless.h b/cpukit/libnetworking/nfsclient/nfsdiskless.h index 0ed5c8f6f7..9c9a41913c 100644 --- a/cpukit/libnetworking/nfsclient/nfsdiskless.h +++ b/cpukit/libnetworking/nfsclient/nfsdiskless.h @@ -13,10 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. |