This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NET/BSD_TCPIP: Fixed some compiler warnings


n.b. I'm not trying to be picky, just watching what you're up to :-)

On Thu, 2003-07-24 at 12:05, Nick Garnett wrote:
> Index: src/sys/net/route.c
> ===================================================================
> RCS file: /cvs/ecos/ecos-opt/net/net/bsd_tcpip/current/src/sys/net/route.c,v
> retrieving revision 1.2
> diff -u -5 -r1.2 route.c
> --- src/sys/net/route.c	23 Apr 2003 08:54:13 -0000	1.2
> +++ src/sys/net/route.c	24 Jul 2003 18:03:21 -0000
> @@ -90,10 +90,15 @@
>  		if (dom->dom_rtattach)
>  			dom->dom_rtattach(&table[dom->dom_family],
>  			    dom->dom_rtoffset);
>  }
>  
> +static void call_route_init( void * arg )
> +{
> +    route_init();
> +}
> +
>  void
>  route_init()
>  {
>  	rn_init();	/* initialize all zeroes, all ones, mask table */
>  	rtable_init((void **)rt_tables);
> @@ -1180,6 +1185,6 @@
>  	}
>  	return (error);
>  }
>  
>  /* This must be before ip6_init2(), which is now SI_ORDER_MIDDLE */
> -SYSINIT(route, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, route_init, 0);
> +SYSINIT(route, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, call_route_init, 0);

Couldn't you do this simpler by just fixing the signature for 
'route_init()'?  I don't see it being used anywhere else other
than in this initialization.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]