pincushionman / cfg-loader

Automatically exported from code.google.com/p/cfg-loader
0 stars 0 forks source link

Source Code - Duplicated Effort #176

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
-Function-

int mkpath(const char *s, int mode)

-Code-

if (path != NULL)
    SAFE_FREE(path);

-Question-

Why check if it is not null when the macro already does that, i doubt removing 
a duplicate if check will make anything any faster but it is seemingly 
pointless to have that if when the macro does the same thing.

Original issue reported on code.google.com by andi.ire...@gmail.com on 4 Aug 2011 at 11:36

GoogleCodeExporter commented 9 years ago
Also in this function at the top

int rv;
rv = -1;

why make this two lines,does this not increase complexity? why make two lines 
when one will work, especially when it becomes easier to read as in this 
case....

int rv = -1;

Original comment by andi.ire...@gmail.com on 4 Aug 2011 at 11:45