httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <>
Subject Re: cvs commit: httpd-2.0/server/mpm/worker worker.c
Date Wed, 19 Sep 2001 15:58:42 GMT

[moving this back on-list]

On Wed, 19 Sep 2001, Aaron Bannert wrote:
> On Wed, Sep 19, 2001 at 11:45:57AM -0400, Cliff Woolley wrote:
> > Anyway, I'm of mixed feelings about the (void) thing, since sometimes we
> > do in fact get bugs from having thrown away a return value that we
> > shouldn't have thrown away.  But then again having the (void) in there
> > doesn't make it any more obvious that THAT's where the bug is, I think...
> > who knows.
> I could really go either way. I've become more accustomed to keeping
> the (void), for readability/maintainability. Just out of curiosity,
> how would a deliberate (void) reveal bugs? I'm not seeing it.

It wouldn't, that's my point.  We often get bugs from discarding an error
that got returned by some function.  Having the (void) in there makes it
more clear that we're discarding a return value to someone who doesn't
know the function returns a value at all, but it doesn't really help find
the bug.  Why?  You see some bug, so you go into the debugger.  You start
stepping through code.  You see an error condition happen in some
function.  You see that error get ignored by the caller.  That's where
your bug is.  The fact that the caller said (void) doesn't help you at

Oh well, I don't care that much.  I don't think the (request_rec *)NULL
needs to be in there (and I doubt anyone else in the group does either),
but I could be convinced either way on the (void) thing.  If someone feels
strongly about it, just give me a -1 and I'll put the (void)'s back.


   Cliff Woolley
   Charlottesville, VA

View raw message