Replace random sbuf_printf() with cheaper cat/putc.
(cherry picked from commit 0a7139485ccb8192e7c7c6d93653da92bfcdc196)