diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-05-16 23:46:48 +0200 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-05-17 08:10:06 -0400 |
commit | db1e5f3021c49c4a320e70a8f9827855f2da385e (patch) | |
tree | 885efda50a15ba7c7114cf75f041264578142ea2 /src | |
parent | 3e13ad07119ad47f94bb45fdccc2d20ac154c218 (diff) |
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.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src')
-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 c51aa1b254..bcbb5d4d2c 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -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); } |