[v2 PATCH 2/3] ucrtbase: Implement _register_onexit_function()

Piotr Caban piotr.caban at gmail.com
Mon Apr 25 10:56:50 CDT 2016


On 04/24/16 20:51, Nikolay Sivov wrote:
> +    len = table->_end - table->_first;
> +
> +    /* grow if full */
> +    if (table->_last == table->_end)
> +    {
> +        table->_first = MSVCRT_realloc(table->_first, 2 * len * sizeof(void *));
> +        table->_end = table->_first + 2 * len;
> +        table->_last = table->_first + len;
> +    }
Please move len initialization/definition into the if block. Also please 
handle allocation failure.

Thanks,
Piotr



More information about the wine-devel mailing list