From 8e1afa0a5dcb95da633acd5004a56bbfc9bf9423 Mon Sep 17 00:00:00 2001 From: Alexander Kuleshov Date: Tue, 16 Feb 2016 00:04:09 +0600 Subject: machine: use deserialize_timestamp_value() which is introduced in the ebf30a086dfa commit. --- src/machine/machine.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/machine') 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; -- cgit v1.2.3-54-g00ecf