timedatectl: do not show (null) if the address of NTP server is not resolved
This commit is contained in:
parent
d96edb2c6e
commit
94ec163ad2
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue