The callers are immediately passing the return value to printf(3) for
"%s". There's only one call per printf(). None of the callers are
bothering to free(3) the existing return value. Return the address of
trim()'s char array, now static, instead. Leave trim() returning NULL
when passed NULL, even though that gives NULL to print(3) for "%s". It,
and slocal's other bugs, remain.