Vlad,
great cleanup! While you are on it, could you also get the function()
vs. if () thing done as well.
Implicitly documented here:
http://forge.mysql.com/wiki/MySQL_Internals_Coding_Guidelines#C.2B.2B_Coding_Guidelines_of_Falcon_storage_engine
A method or function is followed by parenthesis without spaces
function()
method()
Conditionals have a space:
if ()
for ()
while ()
...
>
> - return strlen (buffer);
> + return (int)strlen (buffer);
> }
please use strlen(buffer) here.
[cut]
>
> -MemBlock* MemMgr::alloc(int length)
> +MemBlock* MemMgr::alloc(size_t s)
> {
> - if (length <= 0)
> - throw SQLError (RUNTIME_ERROR, "illegal memory allocate for %d bytes", length);
> + if(s > INT_MAX)
> + throw SQLError (RUNTIME_ERROR, "illegal memory allocate for " I64FORMAT " bytes",
> + (int64)s);
> +
please get back to if () here
[cut]
Best regards,
Hakan
--
Hakan Küçükyılmaz, Senior Software Engineer DBTG/MySQL +49 160
98953296
Sun Microsystems GmbH Sonnenallee 1, DE-85551 Kirchheim-Heimstetten
Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz d. Aufs.rat.: Martin Haering HRB MUC 161028 49.011, 8.376