The code is fine. You're returning a pointer to a string literal which will be valid for the duration of your program.
From the C89 standard:
3.1.4 String literals
A character string literal has static storage duration and type ``array of char ,'' and is initialized with the given characters.