summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kuleshov <kuleshovmail@gmail.com>2016-02-16 00:04:09 +0600
committerAlexander Kuleshov <kuleshovmail@gmail.com>2016-02-16 00:04:09 +0600
commit8e1afa0a5dcb95da633acd5004a56bbfc9bf9423 (patch)
tree25adb6fbf172d39ae64fe1bec91d982c12218c17
parentebf30a086dfa526ca048cf14ae16bb403f3dcd12 (diff)
machine: use deserialize_timestamp_value()
which is introduced in the ebf30a086dfa commit.
-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;