diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-04-13 01:47:56 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-04-13 01:47:56 +0200 |
commit | e48e2912023b5600d291904b0f7b0017387e8cb2 (patch) | |
tree | c2a4d569cbeca5102e89c0be1357d77aea0fe947 /udev/udevd.c | |
parent | ff2c503df091e6e4e9ab48cdb6df6ec8b7b525d0 (diff) |
trivial cleanups
Diffstat (limited to 'udev/udevd.c')
-rw-r--r-- | udev/udevd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/udev/udevd.c b/udev/udevd.c index c785b20757..8610c6c062 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -744,9 +744,11 @@ static int handle_inotify(struct udev *udev) info(udev, "device %s closed, synthesising 'change'\n", udev_device_get_devnode(dev)); util_strscpyl(filename, sizeof(filename), udev_device_get_syspath(dev), "/uevent", NULL); fd = open(filename, O_WRONLY); - if (fd < 0 || write(fd, "change", 6) < 0) - info(udev, "error writing uevent: %m\n"); - close(fd); + if (fd >= 0) { + if (write(fd, "change", 6) < 0) + info(udev, "error writing uevent: %m\n"); + close(fd); + } } if (ev->mask & IN_IGNORED) udev_watch_end(udev, dev); |