j
k
j a
j l
The code currently `malloc`s a larger memory buffer, and if successful: `memcpy`s the old memory buffer to the new, `free`s the old, and reassigns the pointer. This logic can all be reduced to a `realloc`.
Back to the thread
Back to the list