Alfred Perlstein <[EMAIL PROTECTED]> writes:
> Probably not the commentary you're looking for, however the
> getopt parsing shouldn't be done like this:

Some comments is usually better than no comments: to have noticed this
problem, you had to have at least skimmed through the other (kernel)
parts, so I know I didn't do anything *too* evil :-).

> > -   while ((i = getopt(argc, argv, "MmQqSsabC:cN:optT")) != -1)
> > +   use_sysctl = 1;
> > +   while ((i = getopt(argc, argv, "MmQqSsabC:cN:optTy")) != -1)
> >             switch (i) {
> >             case 'M':
> >                     display = SHMTOTAL;
> > @@ -184,39 +187,45 @@
> >             case 't':
> >                     option |= TIME;
> >                     break;
> > +           case 'y':
> > +                   use_sysctl = !use_sysctl;
> > +                   break;
> >             default:
> >                     usage();
> >             }
> 
> Multiple -y options will invert the sense of the flag right?
> 
> Might as well inialize it to 1 in the DATA segment and replace
> !use_sysctl with just 0.

Point taken.  I've done as you suggested in the patch I just posted to
-audit for review.

Thanks again,

                                        Dima Dorfman
                                        [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to