mirror of
https://github.com/systemd/systemd.git
synced 2025-02-27 01:57:35 +03:00
udev: avoid use of uninitialized err
After 1ea972174baba40dbc80c51cbfc4edc49764b59b err is no longer set unless we hit a special case. Initialize it to 0 and remove a check that will never fail.
This commit is contained in:
parent
4723e4b2a4
commit
bf9bead187
@ -267,7 +267,7 @@ static void worker_new(struct event *event)
|
||||
struct udev_event *udev_event;
|
||||
struct worker_message msg;
|
||||
int fd_lock = -1;
|
||||
int err;
|
||||
int err = 0;
|
||||
|
||||
log_debug("seq %llu running", udev_device_get_seqnum(dev));
|
||||
udev_event = udev_event_new(dev);
|
||||
@ -312,7 +312,7 @@ static void worker_new(struct event *event)
|
||||
udev_event_execute_run(udev_event, &sigmask_orig);
|
||||
|
||||
/* apply/restore inotify watch */
|
||||
if (err == 0 && udev_event->inotify_watch) {
|
||||
if (udev_event->inotify_watch) {
|
||||
udev_watch_begin(udev, dev);
|
||||
udev_device_update_db(dev);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user