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