[fix] potential missing 0 termination (strncpy with wrong size)
[cleanup] initialization
[fix] ugly "use after free" bug. The next item should be read before the current one is released.
[fix] conditional double free attempt.
      By the way, you could use scan-build to find this and similar bugs.
[fix] conditional uninitialized variable.
[fix] memory initializaton bug: wrong array size and hardcoded array size in the for loop.
      It's actually not just syntactic sugar: the loop skipped the last element because of the hardcoded array size.
[fix] condition fix: code was never executed because of the wrong condition.
      (Code coverage test is advised, like gcov, kcov, etc.)
[fix] separator test: single separator != more than one separator.
[cleanup] removing unnecessary old code
[fix] uninitialized variables -> initialized with 0.
[cleanup] transform unnecessary array into single local variable
[fix] conditional uninitialized variable
     (However, it has a quite low probability. Anyway, the code should be deterministic.)
[performance] strlen + strcpy is not efficient. strcpy can be replaced with memcpy which is more effective if the length is already known.
[fix] string formating: escape character fix.
[fix] string formating: another escape character fix.
[fix] conditional uninitialized pointer gets initial NULL value.
[fix] conditional segmentation fault: strcmp gets NULL pointer in the default branch which is invalid.
[fix] sizeof(pointer) == 4 or 8 (bytes), so in this case only the first 3 or 7 character is compared instead of the full string.
      The bug is actually architecture dependent (because of the pointer size) which makes it even worse.
      Also the condition can be simplified if I did not mix up the De Morgan's Law.
[fix] potential uninitialized variable
[fix] format string does not match with variable type
[fix] assert(expression) is only evaluated if NDEBUG is defined. If NDEBUG is not defined, then return value is missing.
[cleanup] constantify function parameter
[fix] pointer should be checked, otherwise NULL pointer dereference could happen
      Remark: In non-debug compile (when assert is noop) it's still incomplete.
[performance] sprintf is unnecessary for constant expressions -> replaced with the much faster strcpy
    This kind of transformation is quite easy with Coccinelle semantic patcher ( http://coccinelle.lip6.fr/ ):
    @@ expression E1,E2; @@
    (
    -  sprintf(E1,E2);
    +  strcpy(E1,E2);
    )
[fix] unsafe strncpy usage: possible missing 0 termination