From 8fb3f0099787a5b48213c4e2aa42d8ff61b0c7f1 Mon Sep 17 00:00:00 2001 From: Reverend Homer Date: Fri, 9 Dec 2016 12:04:30 +0300 Subject: tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) --- src/udev/udev-watch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/udev/udev-watch.c') diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index bc9096ed0c..aa432bb90a 100644 --- a/src/udev/udev-watch.c +++ b/src/udev/udev-watch.c @@ -17,13 +17,13 @@ * along with this program. If not, see . */ -#include #include #include #include #include #include +#include "dirent-util.h" #include "stdio-util.h" #include "udev.h" @@ -57,7 +57,7 @@ void udev_watch_restore(struct udev *udev) { return; } - for (ent = readdir(dir); ent != NULL; ent = readdir(dir)) { + FOREACH_DIRENT_ALL(ent, dir, break) { char device[UTIL_PATH_SIZE]; ssize_t len; struct udev_device *dev; -- cgit v1.2.3-54-g00ecf