[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Minor display fix for route show



On Tue, Mar 21, 2006 at 10:34:57PM +0100, Otto Moerbeek wrote:
> On Tue, 21 Mar 2006, Joachim Schipper wrote:
> 
> > On Tue, Mar 21, 2006 at 01:14:21PM -0800, Jon Simola wrote:
> > > Pre patch:
> > > 64.114.35.14       0.e.c.3d.d2.4d     UHLc        0        3      -   carp500
> > > 
> > > Post patch:
> > > 64.114.35.14       00:0e:0c:3d:d2:4d  UHLc        0        3      -   carp500
> > > 
> > > I've looked over the code for route show and I don't believe there to
> > > be any negative impacts, but perhaps someone more familiar with the
> > > code can educate me.
> > > 
> > > --- show.c.orig Tue Mar 21 12:58:05 2006
> > > +++ show.c      Tue Mar 21 12:59:03 2006
> > > @@ -680,6 +680,7 @@
> > >         } else
> > >                 switch (sdl->sdl_type) {
> > >                 case IFT_ETHER:
> > > +               case IFT_CARP:
> > >                         return (ether_ntoa((struct ether_addr *)lla));
> > >                 }
> > >         return (link_ntoa(sdl));
> > 
> > You might want to add a comment there, like /* FALLTHROUGH */. It will
> > make lint(1) happy.
> 
> FALLTHROUGH only applies to 
> 
> 	case x:
> 		statements;
> 	case y:
> 		statements;
> 
> If there are no statements between the case labels, lint won't
> complain. 

Ooopsie. That goes to show that reading the man page and using it a
couple of times is not enough.

Sorry for the noise, and thanks for the explanation, Otto.

		Joachim



Visit your host, monkey.org