which: remove unnecessary third parameter in O_RDONLY call to open(3)

Signed-off-by: Mattias Andrée <maandree@kth.se>
This commit is contained in:
Mattias Andrée 2019-07-27 22:29:11 +02:00 committed by Michael Forney
parent 9719a7e3d2
commit be34c4a24d
1 changed files with 1 additions and 1 deletions

View File

@ -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);