aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wtf8.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/wtf8.c b/wtf8.c
index 3e09808..0b8f3a8 100644
--- a/wtf8.c
+++ b/wtf8.c
@@ -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