summaryrefslogtreecommitdiff
path: root/lib/libc/gen/scandir.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/scandir.c')
-rw-r--r--lib/libc/gen/scandir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c
index c364bda6c4f..870dc0a39ad 100644
--- a/lib/libc/gen/scandir.c
+++ b/lib/libc/gen/scandir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scandir.c,v 1.20 2015/08/20 21:49:29 deraadt Exp $ */
+/* $OpenBSD: scandir.c,v 1.21 2019/06/28 13:32:41 deraadt Exp $ */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -70,7 +70,7 @@ scandir(const char *dirname, struct dirent ***namelist,
if ((dirp = opendir(dirname)) == NULL)
return (-1);
- if (fstat(dirp->dd_fd, &stb) < 0)
+ if (fstat(dirp->dd_fd, &stb) == -1)
goto fail;
/*
@@ -97,7 +97,7 @@ scandir(const char *dirname, struct dirent ***namelist,
if (nitems >= arraysz) {
struct dirent **nnames;
- if (fstat(dirp->dd_fd, &stb) < 0)
+ if (fstat(dirp->dd_fd, &stb) == -1)
goto fail;
arraysz *= 2;