}
print_device(device);
udev_device_unref(device);
- }
-
- if (ev[i].data.fd == STDIN_FILENO && ev[i].events & EPOLLIN) {
+ } else if (ev[i].data.fd == STDIN_FILENO && ev[i].events & EPOLLIN) {
printf("exiting loop\n");
goto out;
}
continue;
print_device(device, "KERNEL", prop);
udev_device_unref(device);
- }
-
- if (ev[i].data.fd == fd_udev && ev[i].events & EPOLLIN) {
+ } else if (ev[i].data.fd == fd_udev && ev[i].events & EPOLLIN) {
struct udev_device *device;
device = udev_monitor_receive_device(udev_monitor);