On Wed, May 20, 2015 at 10:21:12PM +0200, Fritjof Bornebusch wrote: > On Wed, May 20, 2015 at 09:35:03PM +0200, Alexander Hall wrote: > > > > > > On May 20, 2015 5:08:21 PM GMT+02:00, Fritjof Bornebusch > > <frit...@alokat.org> wrote: > > >Hi, > > > > > >for what is the ? sign for? > > > > fallthrough to usage() > > > > But why is this necessary, haven't seen this in other deamons? > BTW: isn't the \* FALLTHROUGH *\ comment missing?
default: covers the '?' case so it is not stricktly needed but read the RETURN VALUES section of getopt(3) if you wonder why '?' needs to be catched. FALLTHROUGH is only needed if there is code between the case statement as indication that the break was left out for a reason. In this case it is obvious that this is a combined case statement. -- :wq Claudio > > # apmd -? > > > > /Alexander > > > > --F. > > > > > > >Regards, > > >--F. > > > > > > > > >Index: apmd.c > > >=================================================================== > > >RCS file: /cvs/src/usr.sbin/apmd/apmd.c,v > > >retrieving revision 1.75 > > >diff -u -p -r1.75 apmd.c > > >--- apmd.c 6 Feb 2015 08:16:50 -0000 1.75 > > >+++ apmd.c 20 May 2015 15:04:38 -0000 > > >@@ -403,7 +403,6 @@ main(int argc, char *argv[]) > > > doperf = PERF_MANUAL; > > > setperfpolicy("high"); > > > break; > > >- case '?': > > > default: > > > usage(); > > > } > >