Properly check vsnprintf() return value
The manual page reads: Thus, a return value of size or more means that the output was truncated. Also there is no need to explictely add a NUL character '\0' at the end of the formatting string. The C compiler automatically adds the NUL character at the end of string literals, and vsnprintf() always terminates its output with a NUL character, whether truncating or not.
Loading
Please register or sign in to comment