From be34c4a24d1d07b6b3dbd99168fb3de299c88d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Sat, 27 Jul 2019 22:29:11 +0200 Subject: [PATCH] which: remove unnecessary third parameter in O_RDONLY call to open(3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- which.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/which.c b/which.c index cc93361..3f9af6e 100644 --- a/which.c +++ b/which.c @@ -43,7 +43,7 @@ which(const char *path, const char *name) if (ptr[i] != ':' && ptr[i] != '\0') continue; ptr[i] = '\0'; - if ((dirfd = open(p, O_RDONLY, 0)) >= 0) { + if ((dirfd = open(p, O_RDONLY)) >= 0) { if (canexec(dirfd, name)) { found = 1; fputs(p, stdout);