mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-28 00:38:38 +08:00
Fixed many warnings.
This commit is contained in:
@@ -120,14 +120,18 @@ ether_output(ifp, m0, dst, rt0)
|
||||
{
|
||||
short type;
|
||||
int s, error = 0;
|
||||
u_char *cp, edst[6];
|
||||
register struct mbuf *m2, *m = m0;
|
||||
#ifdef NS
|
||||
u_char *cp
|
||||
register struct ifqueue *inq;
|
||||
register struct mbuf *m2;
|
||||
#endif
|
||||
u_char edst[6];
|
||||
register struct mbuf *m = m0;
|
||||
register struct rtentry *rt;
|
||||
struct mbuf *mcopy = (struct mbuf *)0;
|
||||
register struct ether_header *eh;
|
||||
int off, len = m->m_pkthdr.len;
|
||||
struct arpcom *ac = (struct arpcom *)ifp;
|
||||
register struct ifqueue *inq;
|
||||
#ifdef NETATALK
|
||||
struct at_ifaddr *aa;
|
||||
#endif NETATALK
|
||||
@@ -457,7 +461,10 @@ ether_input(ifp, eh, m)
|
||||
struct mbuf *m;
|
||||
{
|
||||
register struct ifqueue *inq;
|
||||
u_short ether_type, *checksum;
|
||||
u_short ether_type;
|
||||
#ifdef NS
|
||||
u_short *checksum;
|
||||
#endif
|
||||
int s;
|
||||
#if defined (ISO) || defined (LLC) || defined(NETATALK)
|
||||
register struct llc *l;
|
||||
|
||||
@@ -517,7 +517,7 @@ rtrequest(req, dst, gateway, netmask, flags, ret_nrt)
|
||||
senderr(ENOBUFS);
|
||||
Bzero(rt, sizeof(*rt));
|
||||
rt->rt_flags = RTF_UP | flags;
|
||||
if (error = rt_setgate(rt, dst, gateway)) {
|
||||
if ((error = rt_setgate(rt, dst, gateway))) {
|
||||
Free(rt);
|
||||
senderr(error);
|
||||
}
|
||||
|
||||
@@ -225,8 +225,8 @@ route_output(m, so)
|
||||
case RTM_LOCK:
|
||||
if ((rnh = rt_tables[dst->sa_family]) == 0) {
|
||||
senderr(EAFNOSUPPORT);
|
||||
} else if (rt = (struct rtentry *)
|
||||
rnh->rnh_lookup(dst, netmask, rnh))
|
||||
} else if ((rt = (struct rtentry *)
|
||||
rnh->rnh_lookup(dst, netmask, rnh)))
|
||||
rt->rt_refcnt++;
|
||||
else
|
||||
senderr(ESRCH);
|
||||
|
||||
Reference in New Issue
Block a user