diff options
author | Alexander Kuleshov <kuleshovmail@gmail.com> | 2016-02-16 00:04:49 +0600 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-06-16 10:12:57 +0200 |
commit | 321944052ce227a1d9b26d268772c7c076d57960 (patch) | |
tree | 1582c0bfac914ba960845cf4512ee8fe1d76d4b4 /src/login/logind-session.c | |
parent | 3389adca4a8f7dec9885fc8ce034e3302812e436 (diff) |
logind: use deserialize_timestamp_value()
which is introduced in the ebf30a086d commit.
Diffstat (limited to 'src/login/logind-session.c')
-rw-r--r-- | src/login/logind-session.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c index c37e87565..accf83d5f 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -452,17 +452,8 @@ 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; - } + deserialize_timestamp_value(realtime, &s->timestamp.realtime); + deserialize_timestamp_value(monotonic, &s->timestamp.monotonic); if (controller) { if (bus_name_has_owner(s->manager->bus, controller, NULL) > 0) |