summaryrefslogtreecommitdiff
path: root/src/hostname
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-10-11 19:34:17 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-10-13 17:56:54 -0400
commit872c8faaf2009422a91d227ae0b5c6f04c9d2c69 (patch)
treea6b03abbcd801638098ec591f48873b39f6a0dcd /src/hostname
parent51d122af23533b0b8318911c4fc8b128ad8eafb7 (diff)
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.
Diffstat (limited to 'src/hostname')
-rw-r--r--src/hostname/hostnamectl.c2
1 files changed, 2 insertions, 0 deletions
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);