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

View File

@ -43,7 +43,7 @@ which(const char *path, const char *name)
if (ptr[i] != ':' && ptr[i] != '\0') if (ptr[i] != ':' && ptr[i] != '\0')
continue; continue;
ptr[i] = '\0'; ptr[i] = '\0';
if ((dirfd = open(p, O_RDONLY, 0)) >= 0) { if ((dirfd = open(p, O_RDONLY)) >= 0) {
if (canexec(dirfd, name)) { if (canexec(dirfd, name)) {
found = 1; found = 1;
fputs(p, stdout); fputs(p, stdout);