]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/hostname/hostnamectl.c
tree-wide: shorten error logging a bit
[thirdparty/systemd.git] / src / hostname / hostnamectl.c
index 8587f5c59f857feff8ea3c61101ec71a8baeae18..fa4292c1fc229725cf0a11d69a225e5190bb2a7d 100644 (file)
@@ -227,8 +227,9 @@ static int set_simple_string(sd_bus *bus, const char *method, const char *value)
                         &error, NULL,
                         "sb", value, arg_ask_password);
         if (r < 0)
-                log_error("Could not set property: %s", bus_error_message(&error, -r));
-        return r;
+                return log_error_errno(r, "Could not set property: %s", bus_error_message(&error, -r));
+
+        return 0;
 }
 
 static int set_hostname(int argc, char **argv, void *userdata) {