David Reid wrote:

Colm MacCarthaigh wrote:


On Mon, Dec 29, 2003 at 01:39:28PM +0000, Ben Laurie wrote:


So, I've written a forensic logging module. What this does is log the request as soon as all the headers have been read, then log again when its complete. Any request that doesn't complete should be viewed with great suspicion!

Cool, extremely useful in a lot of circumstances. Just one or two questions though. Is next_id deliberately random? It doesn't seem to get initialised anywhere, though that may be a feature.

Static variables are initialised to zero.

That's not true on all platforms, sadly :(

Then those platforms are broken. K&R, ed. 2, A8.7 p.219:


"A static object not explicitly initialized is initialized as if it (or its members) were assigned the constant 0."

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html       http://www.thebunker.net/

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Reply via email to