chiark / gitweb /
time-util: Rename and fix call of deserialize_timestamp_value()
[elogind.git] / src / login / logind-session.c
index c37e87565921dd634fb175cdaafe644e045f53e8..ff2c95c55d60c3192bbbd36690dd2a1af773bcc0 100644 (file)
@@ -452,17 +452,10 @@ int session_load(Session *s) {
                 safe_close(fd);
         }
 
-        if (realtime) {
-                unsigned long long l;
-                if (sscanf(realtime, "%llu", &l) > 0)
-                        s->timestamp.realtime = l;
-        }
-
-        if (monotonic) {
-                unsigned long long l;
-                if (sscanf(monotonic, "%llu", &l) > 0)
-                        s->timestamp.monotonic = l;
-        }
+        if (realtime)
+                timestamp_deserialize(realtime, &s->timestamp.realtime);
+        if (monotonic)
+                timestamp_deserialize(monotonic, &s->timestamp.monotonic);
 
         if (controller) {
                 if (bus_name_has_owner(s->manager->bus, controller, NULL) > 0)