From 94ec163ad270e89be29bccc5d5edf1b038a29eae Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 17 Jul 2020 02:56:29 +0900 Subject: [PATCH] timedatectl: do not show (null) if the address of NTP server is not resolved --- src/timedate/timedatectl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 49d68d2533..36b26874f0 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -409,7 +409,7 @@ static int print_ntp_status_info(NTPStatusInfo *i) { if (r < 0) return table_log_add_error(r); - r = table_add_cell_stringf(table, NULL, "%s (%s)", i->server_address, i->server_name); + r = table_add_cell_stringf(table, NULL, "%s (%s)", strna(i->server_address), strna(i->server_name)); if (r < 0) return table_log_add_error(r); -- 2.25.1