On Wed Sep 13 02:57:29 2023 +0000, Alex Henrie wrote:
You're right that it's unnecessary to cast the void pointer returned from malloc or realloc, so I've removed those casts. Thanks for pointing that out. As far as the casts in the calls to free, they are all to avoid warnings about freeing pointers to const strings, so they can't be removed.
No, never mind, it's necessary to cast the pointers returned from malloc and realloc here because we add 1 to the pointer before assigning it to a variable. It's unusual but it works. Still, we could simplify this code a bit by only calling realloc.