On Aug 24, 2014 1:41 PM, "Dave Hansen" wrote: > > Let's say there is 1 "buf_left" and I attempt a 100-byte snprintf(). > Won't snprintf() return 1, and buf_written will then equal buf_len? No. snprintf() returns turn number of bytes it *would* write, if i it wasn't truncated. That's so that people can reallocate a buffer of sufficient size and just try again. Linus