timedatectl: do not show (null) if the address of NTP server is not resolved
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user