rewrite `buf` assignment in `itoa()`