Given that you're about to re-set s, this might as well be s+1 instead of s++; alternatively <code>
s++[0] = '\0';
*filename = s;
</code>