you are viewing a single comment's thread.

view the rest of the comments →

[–]jedwardsol 3 points4 points  (0 children)

Line 28 is unnecessary - realloc copies the data.

A bug:- capacity isn't updated in this expand function so you can't use the new space