> On Sat, Nov 17, 2018 at 03:47:16PM -0800, Rodney W. Grimes wrote:
> > > Author: markj
> > > Date: Sat Nov 17 20:01:35 2018
> > > New Revision: 340511
> > > URL: https://svnweb.freebsd.org/changeset/base/340511
> > > 
> > > Log:
> > >   MFC r339731:
> > >   Add FALLTHROUGH comments to appease Coverity.
> > > 
> > > Modified:
> > >   stable/12/sys/kern/kern_environment.c
> > >   stable/12/sys/kern/vfs_mount.c
> > > Directory Properties:
> > >   stable/12/   (props changed)
> > > 
> > > Modified: stable/12/sys/kern/kern_environment.c
> > > ==============================================================================
> > > --- stable/12/sys/kern/kern_environment.c Sat Nov 17 20:00:10 2018        
> > > (r340510)
> > > +++ stable/12/sys/kern/kern_environment.c Sat Nov 17 20:01:35 2018        
> > > (r340511)
> > > @@ -839,10 +839,13 @@ getenv_quad(const char *name, quad_t *data)
> > >   switch (vtp[0]) {
> > >   case 't': case 'T':
> > >           iv *= 1024;
> > > +         /* FALLTHROUGH */
> > >   case 'g': case 'G':
> > >           iv *= 1024;
> > > +         /* FALLTHROUGH */
> > >   case 'm': case 'M':
> > >           iv *= 1024;
> > > +         /* FALLTHROUGH */
> > >   case 'k': case 'K':
> > >           iv *= 1024;
> > Missing /* FALLTHROUGH */ ??
> 
> The statement following "case '\0':" is a break.
> 
> > 
> > >   case '\0':
> > 
> > And a refactor:
> > 
> >     case 't': case 'T':
> >     case 'g': case 'G':
> >     case 'm': case 'M':
> >     case 'k': case 'K':
> >             iv *= 1024;
> >             /* FALLTHROUGH */
> >     case '\0':
> > 
> > Isnt that the same functionality?
> 
> No, it isn't.
Gag, for some reason I was reading iv *=1024 as *iv = 1024,
I need more sleep :-(

-- 
Rod Grimes                                                 [email protected]
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to