diff options
author | Tom Gundersen <teg@jklm.no> | 2015-03-13 18:43:00 +0100 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-03-18 20:55:21 -0400 |
commit | 89fe48ab026869f8b76a3b6a7ea89f0d5c772b31 (patch) | |
tree | b30c2e223ad9777b4ec7a4fc8afe432068f0f326 /src/udev/udevd.c | |
parent | 35ef251e168ba03f395d04394b88fdb2fa437ea9 (diff) |
udev: make set_usec_initialized() internal to libudev
Instead introduce ensure_usec_initialized(), which copies the timestamp if possible otherwise
sets it to now(CLOCK_MONOTONIC).
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r-- | src/udev/udevd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 10222eb1be..7eeceb42c0 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1423,8 +1423,8 @@ int main(int argc, char *argv[]) { struct udev_device *dev; dev = udev_monitor_receive_device(monitor); - if (dev != NULL) { - udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC)); + if (dev) { + udev_device_ensure_usec_initialized(dev, NULL); if (event_queue_insert(dev) < 0) udev_device_unref(dev); } |