It has to be `%.*s`, you used `*` before the `.` -- also you do not need that expression with address of the first char, just give `session->ip_addr.s` instead of `&session->ip_addr.s[0]`, it should avoid array access and get address of it -- probably there is not much difference in performance, but I find it easier to follow up.