Hi Jaakko,
Make the whole change it one loop. No need to check if there is, empty
strings, at first.
It's greedy and, if there 1+ empty lines, you will anyway loop all over
again.
Tomasz
This helper function takes in a heap-allocated buffer of heap-allocated
strings. If no strings should
Hi Jaakko,
On ke, 2015-07-15 at 11:35 +0300, Jaakko Hannikainen wrote:
This helper function takes in a heap-allocated buffer of heap-allocated
strings. If no strings should be removed, return the buffer. Else, free
all empty strings, place nonempty strings to a new container and return
it,
This helper function takes in a heap-allocated buffer of heap-allocated
strings. If no strings should be removed, return the buffer. Else, free
all empty strings, place nonempty strings to a new container and return
it, freeing the old container.
---
src/service.c | 32
Hi Jaakko,
On ke, 2015-07-15 at 11:35 +0300, Jaakko Hannikainen wrote:
This helper function takes in a heap-allocated buffer of heap-allocated
strings. If no strings should be removed, return the buffer. Else, free
all empty strings, place nonempty strings to a new container and return
it,