From 872c8faaf2009422a91d227ae0b5c6f04c9d2c69 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 11 Oct 2013 19:34:17 -0400 Subject: Fix write-only use of a few variables Since the invention of read-only memory, write-only memory has been considered deprecated. Where appropriate, either make use of the value, or avoid writing it, to make it clear that it is not used. --- src/hostname/hostnamectl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/hostname') diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c index 66015c2f4c..c6d72b5417 100644 --- a/src/hostname/hostnamectl.c +++ b/src/hostname/hostnamectl.c @@ -110,6 +110,8 @@ static void print_status_info(StatusInfo *i) { "PRETTY_NAME", &pretty_name, "CPE_NAME", &cpe_name, NULL); + if (r < 0) + log_warning("Failed to read /etc/os-release: %s", strerror(-r)); if (!isempty(pretty_name)) printf(" Operating System: %s\n", pretty_name); -- cgit v1.2.3-54-g00ecf