chiark / gitweb /
everywhere: actually make use of DUAL_TIMESTAMP_NULL macro
authorLennart Poettering <lennart@poettering.net>
Mon, 15 Jun 2015 23:08:12 +0000 (01:08 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:03:02 +0000 (10:03 +0100)
Let's use it as initializer where appropriate.

src/login/logind-core.c
src/login/logind-dbus.c
src/login/logind-inhibit.c
src/login/logind-seat.c
src/login/logind-session-dbus.c
src/login/logind-user-dbus.c
src/login/logind-user.c

index d5af8dc..44cae89 100644 (file)
@@ -352,7 +352,7 @@ int manager_get_user_by_pid(Manager *m, pid_t pid, User **user) {
 int manager_get_idle_hint(Manager *m, dual_timestamp *t) {
         Session *s;
         bool idle_hint;
-        dual_timestamp ts = { 0, 0 };
+        dual_timestamp ts = DUAL_TIMESTAMP_NULL;
         Iterator i;
 
         assert(m);
index 88caa3b..93711fe 100644 (file)
@@ -158,7 +158,7 @@ static int property_get_idle_since_hint(
                 sd_bus_error *error) {
 
         Manager *m = userdata;
-        dual_timestamp t;
+        dual_timestamp t = DUAL_TIMESTAMP_NULL;
 
         assert(bus);
         assert(reply);
index 68304a1..855c854 100644 (file)
@@ -371,7 +371,7 @@ bool manager_is_inhibited(
 
         Inhibitor *i;
         Iterator j;
-        struct dual_timestamp ts = { 0, 0 };
+        struct dual_timestamp ts = DUAL_TIMESTAMP_NULL;
         bool inhibited = false;
 
         assert(m);
index 6e6e78a..8198011 100644 (file)
@@ -567,7 +567,7 @@ bool seat_can_graphical(Seat *s) {
 int seat_get_idle_hint(Seat *s, dual_timestamp *t) {
         Session *session;
         bool idle_hint = true;
-        dual_timestamp ts = { 0, 0 };
+        dual_timestamp ts = DUAL_TIMESTAMP_NULL;
 
         assert(s);
 
index 3a7b1a0..d51a6e4 100644 (file)
@@ -163,7 +163,7 @@ static int property_get_idle_since_hint(
                 sd_bus_error *error) {
 
         Session *s = userdata;
-        dual_timestamp t;
+        dual_timestamp t = DUAL_TIMESTAMP_NULL;
         uint64_t u;
         int r;
 
index 8a710ce..0f72d70 100644 (file)
@@ -138,7 +138,7 @@ static int property_get_idle_since_hint(
                 sd_bus_error *error) {
 
         User *u = userdata;
-        dual_timestamp t;
+        dual_timestamp t = DUAL_TIMESTAMP_NULL;
         uint64_t k;
 
         assert(bus);
index a9cf529..6720899 100644 (file)
@@ -619,7 +619,7 @@ int user_finalize(User *u) {
 int user_get_idle_hint(User *u, dual_timestamp *t) {
         Session *s;
         bool idle_hint = true;
-        dual_timestamp ts = { 0, 0 };
+        dual_timestamp ts = DUAL_TIMESTAMP_NULL;
 
         assert(u);