summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-watch.c
diff options
context:
space:
mode:
authorReverend Homer <mk.43.ecko@gmail.com>2016-12-09 10:04:30 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2016-12-09 10:04:30 +0100
commit8fb3f0099787a5b48213c4e2aa42d8ff61b0c7f1 (patch)
treec9bf990e18daac08ec1e744d6be365a9e98d2532 /src/udev/udev-watch.c
parentMerge pull request #4686 from poettering/machine-id-app-specific (diff)
downloadsystemd-8fb3f0099787a5b48213c4e2aa42d8ff61b0c7f1.tar.xz
systemd-8fb3f0099787a5b48213c4e2aa42d8ff61b0c7f1.zip
tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853)
Diffstat (limited to 'src/udev/udev-watch.c')
-rw-r--r--src/udev/udev-watch.c4
1 files changed, 2 insertions, 2 deletions
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 <http://www.gnu.org/licenses/>.
*/
-#include <dirent.h>
#include <errno.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/inotify.h>
#include <unistd.h>
+#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;