]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
timedatectl: drop unnecessary temporal variables
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 16 Aug 2024 10:34:09 +0000 (19:34 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 19 Aug 2024 02:36:32 +0000 (11:36 +0900)
Also drop unnecessary spaces.

src/timedate/timedatectl.c

index ac5576a98bd7a4f840bec2bf0b17ee759b6cf255..1a1371030ac2e2bfc5a5eb10f0e63bf62d3cd7d5 100644 (file)
@@ -213,7 +213,6 @@ static int show_properties(int argc, char **argv, void *userdata) {
 
 static int set_time(int argc, char **argv, void *userdata) {
         _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
-        bool relative = false, interactive = arg_ask_password;
         sd_bus *bus = userdata;
         usec_t t;
         int r;
@@ -230,7 +229,7 @@ static int set_time(int argc, char **argv, void *userdata) {
                         "SetTime",
                         &error,
                         NULL,
-                        "xbb", (int64_t) t, relative, interactive);
+                        "xbb", (int64_t) t, false, arg_ask_password);
         if (r < 0)
                 return log_error_errno(r, "Failed to set time: %s", bus_error_message(&error, r));
 
@@ -297,7 +296,7 @@ static int set_ntp(int argc, char **argv, void *userdata) {
         r = bus_message_new_method_call(bus, &m, bus_timedate, "SetNTP");
         if (r < 0)
                 return bus_log_create_error(r);
-                
+
         r = sd_bus_message_append(m, "bb", b, arg_ask_password);
         if (r < 0)
                 return bus_log_create_error(r);