diff options
-rw-r--r-- | wtf8.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -17,11 +17,10 @@ void print_octets(char *s) { /* * Iterate through the string, printing each octet */ - for (; *s; s++) - printf( - is_utf8_cont(*s) ? "-%02x" : " %02x", - (unsigned char) *s - ); + for (; *s; s++) { + putchar(is_utf8_cont(*s) ? '-' : ' '); + printf("%02x", (unsigned char) *s); + } /* * End with a newline |