diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-07-17 02:56:29 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-07-17 03:10:42 +0900 |
commit | 94ec163ad270e89be29bccc5d5edf1b038a29eae (patch) | |
tree | 539f57897ba3b179fa349a721ae5492b0a7ae159 | |
parent | d96edb2c6e7014e93e6713c79a698c91463c8929 (diff) | |
download | systemd-94ec163ad270e89be29bccc5d5edf1b038a29eae.tar.gz |
timedatectl: do not show (null) if the address of NTP server is not resolved
-rw-r--r-- | src/timedate/timedatectl.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |