summaryrefslogtreecommitdiff
path: root/files.c
diff options
context:
space:
mode:
authorJagger <robert@swiecki.net>2016-08-23 23:47:19 +0200
committerJagger <robert@swiecki.net>2016-08-23 23:47:19 +0200
commitf2723e11fadb337b49cf718c169f7cca9adea197 (patch)
tree1e408f9e5c4d2f32053fc20428b308f18a735d0c /files.c
parent491c7a55714d0d8fbef69595fd4388cbf1880895 (diff)
downloadhonggfuzz-f2723e11fadb337b49cf718c169f7cca9adea197.tar.gz
readdir_r -> readdir + indent
Diffstat (limited to 'files.c')
-rw-r--r--files.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/files.c b/files.c
index 436f6034..c88ae49a 100644
--- a/files.c
+++ b/files.c
@@ -157,8 +157,8 @@ static bool files_readdir(honggfuzz_t * hfuzz)
int count = 0;
for (;;) {
- struct dirent de, *res;
- if (readdir_r(dir, &de, &res) > 0) {
+ struct dirent *res = readdir(dir);
+ if (res == NULL && errno != 0) {
PLOG_W("Couldn't read the '%s' dir", hfuzz->inputFile);
return false;
}