Re: [v2 PATCH 2/3] ucrtbase: Implement _register_onexit_function()
25 Apr
2016
25 Apr
'16
3:56 p.m.
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
3520
Age (days ago)
3520
Last active (days ago)
0 comments
1 participants
participants (1)
-
Piotr Caban