aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dumpleases.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/dumpleases.c')
-rw-r--r--networking/udhcp/dumpleases.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c
index d8f5da7fb..eab9713f4 100644
--- a/networking/udhcp/dumpleases.c
+++ b/networking/udhcp/dumpleases.c
@@ -71,8 +71,11 @@ int dumpleases_main(int argc UNUSED_PARAM, char **argv)
71 /* actually, 15+1 and 19+1, +1 is a space between columns */ 71 /* actually, 15+1 and 19+1, +1 is a space between columns */
72 /* lease.hostname is char[20] and is always NUL terminated */ 72 /* lease.hostname is char[20] and is always NUL terminated */
73#if ENABLE_FEATURE_ASSUME_UNICODE 73#if ENABLE_FEATURE_ASSUME_UNICODE
74 printf(" %-16s%s%*s", inet_ntoa(addr), lease.hostname, 74 {
75 20 - (int)unicode_strlen(lease.hostname), ""); 75 char *uni_name = unicode_conv_to_printable_fixedwidth(NULL, lease.hostname, 20);
76 printf(" %-16s%s", inet_ntoa(addr), uni_name);
77 free(uni_name);
78 }
76#else 79#else
77 printf(" %-16s%-20s", inet_ntoa(addr), lease.hostname); 80 printf(" %-16s%-20s", inet_ntoa(addr), lease.hostname);
78#endif 81#endif