Source-Changes archive

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

Re: CVS commit: src/sys/net



> On Wed, Jul 23, 2008 at 03:21:55PM +0900, Masao Uebayashi wrote:
> > In 1.167:
> > 
> >    1492         case SIOCSIFFLAGS:
> >    1493                 switch (ifp->if_flags & (IFF_UP|IFF_RUNNING)) {
> >    1494                         /*
> >    1495                          * If interface is marked down and it is 
> running,
> >    1496                          * then stop and disable it.
> >    1497                          */
> >    1498                         (*ifp->if_stop)(ifp, 1);
> >    1499                         break;
> > 
> > No case label here.
> 
> The proper fix is to add a 'case IFF_RUNNING:' below the switch ().
> Please, make the proper fix, instead.


I don't think that adding multiple exit points to functions is going to help 
the effort towards fine-grained locking.  Functions should be converted to have 
single exit points so that locking is less complicated.

Beyond the introduced bugs, I think the original change is going in the wrong 
direction.



      Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au


Home | Main Index | Thread Index | Old Index