[Code Clean] Wording.
[Detail] Avoid unnecessary copying.
[Bug Fix] Fixed possible conditional jump.

To check results from functions, which can go the wrong way - is a good idea! Sometimes `strftime` cannot fill provided buffer completely, because of initial format, for example.
The best way for testing environment is to abort program execution and extend the buffer needed to match all cases.