Refactor string.c

It is unnecessary to assign variable.