On Fri, Sep 11, 2009 at 7:57 PM, <minf...@apache.org> wrote: > Author: minfrin > Date: Fri Sep 11 23:57:48 2009 > New Revision: 814091 > > URL: http://svn.apache.org/viewvc?rev=814091&view=rev > Log: > htcacheclean: 19 ways to fail, 1 error message. Fixed. > > Modified: > httpd/httpd/trunk/CHANGES > httpd/httpd/trunk/support/htcacheclean.c > > > Modified: httpd/httpd/trunk/support/htcacheclean.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htcacheclean.c?rev=814091&r1=814090&r2=814091&view=diff > > ============================================================================== > --- httpd/httpd/trunk/support/htcacheclean.c (original) > +++ httpd/httpd/trunk/support/htcacheclean.c Fri Sep 11 23:57:48 2009 > @@ -802,48 +806,48 @@ > break; > } > else if (status != APR_SUCCESS) { > - usage(); > + usage(NULL); > } > else { > switch (opt) { > case 'i': > if (intelligent) { > - usage(); > + usage(apr_psprintf(pool, "The option '%c' cannot be > specified more than once", (int)opt)); >
Why does opt need to be cast to (int)? Why not simply zap all these checks of the form if (silly user specified no-argument option again) { remind them who is boss } to avoid code bloat?