summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-15 20:29:59 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-15 20:29:59 +0100
commit11ab173d4067a4ed6fab811ba2159456053fd4c1 (patch)
tree509a4ca821d87238e73de76087473a169eb9f45a /src/machine
parent251b4cb6a256d5766ff5b47a4be9057934fe528d (diff)
parentd4c6cc937c4943d3195e0d2169bb52c466507b8e (diff)
Merge pull request #2611 from 0xAX/deserialize-clkid
time-util: introduce deserialize_timestamp_value()
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machine.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/machine/machine.c b/src/machine/machine.c
index 406d5a4b85..7e92ffc474 100644
--- a/src/machine/machine.c
+++ b/src/machine/machine.c
@@ -299,17 +299,8 @@ int machine_load(Machine *m) {
m->class = c;
}
- if (realtime) {
- unsigned long long l;
- if (sscanf(realtime, "%llu", &l) > 0)
- m->timestamp.realtime = l;
- }
-
- if (monotonic) {
- unsigned long long l;
- if (sscanf(monotonic, "%llu", &l) > 0)
- m->timestamp.monotonic = l;
- }
+ deserialize_timestamp_value(realtime, &m->timestamp.realtime);
+ deserialize_timestamp_value(monotonic, &m->timestamp.monotonic);
if (netif) {
size_t allocated = 0, nr = 0;