What does this help? A constant like MAX_FD should be a define in a global header file, something like config.h which can be included by any source code that needs it. When it needs to change, one need only edit 1 single line in a single file. As it was I could still grep by MAX_FD and change the 3 occurrences it would find. But as it is now, what should I grep for? 32? It gives 588 hits!
Also what is the point of using a local variable constrained to a constant in place of a #defined constant? IMO, #defined constants at the top of a source file, are a simple way for someone who is not familiar with the code to modify the outcome of the code by altering simple constants that are found at the top of the file without dwelling into the source code. As you modified, one has to dig into the source code just to find where something as simple as a constant needs to be changed. On Wednesday 19 December 2007, Henning Westerholt wrote: > Revision: 3442 > http://openser.svn.sourceforge.net/openser/?rev=3442&view=rev > Author: henningw > Date: 2007-12-19 05:00:02 -0800 (Wed, 19 Dec 2007) > > Log Message: > ----------- > - cleanups, remove some #defines, replace one with local variable > > Modified Paths: > -------------- > trunk/daemonize.c > trunk/main.c > trunk/modules/cpl-c/cpl_nonsig.c > > > This was sent by the SourceForge.net collaborative development > platform, the world's largest Open Source development site. > > _______________________________________________ > Devel mailing list > [email protected] > http://lists.openser.org/cgi-bin/mailman/listinfo/devel -- Dan _______________________________________________ Devel mailing list [email protected] http://lists.openser.org/cgi-bin/mailman/listinfo/devel
