summaryrefslogtreecommitdiff
path: root/src/core/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/device.c')
-rw-r--r--src/core/device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 0b01718ad4..fb948688b6 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -477,7 +477,6 @@ static void device_shutdown(Manager *m) {
}
static int device_enumerate(Manager *m) {
- struct epoll_event ev;
int r;
struct udev_enumerate *e = NULL;
struct udev_list_entry *item = NULL, *first = NULL;
@@ -485,6 +484,8 @@ static int device_enumerate(Manager *m) {
assert(m);
if (!m->udev) {
+ struct epoll_event ev;
+
if (!(m->udev = udev_new()))
return -ENOMEM;