Hi!
On Feb 22, tim@stripped wrote:
> ChangeSet@stripped, 2008-02-22 14:06:53-07:00, tsmith@stripped +1 -0
> Bug #20748: Configuration files should not be read more than once
>
> Normalize directory names before adding them to default_directories.
Tim, I'm mainly have problems with the code you're fixing, not with this
patch. In other words, with the first patch for Bug#20748.
In particular:
1. Why did you need a init_default_directories() variable where you
store the actual function to be called ? Why not to do it like we do
elsewhere e.g.
static void init_default_directories()
{
#ifdef __NETWARE__
...
#elif defined(__EMX__) || defined(OS2)
...
2. Why ADD_DIRECTORY is defined differently for debug and non-debug
builds ? Remember, the fewer ifdefs we have in the code, the better.
FIxing 1 and 2, you will be able to remove your utility macros, like
ADD_DIRECTORY_INTERNAL() and ADD_COMMON_DIRECTORIES() - they aren't
really necessary, only add a one more redirection step for a reviewer
(or whoever is reading the code).
The above also made this your patch more difficult to understand than it
should be.
Regards / Mit vielen Grüssen,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <serg@stripped>
/ /|_/ / // /\ \/ /_/ / /__ Principal Software Developer/Server Architect
/_/ /_/\_, /___/\___\_\___/ MySQL GmbH, Dachauer Str. 37, D-80335 München
<___/ Geschäftsführer: Kaj Arnö - HRB
München 162140