sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit be34c4a24d1d07b6b3dbd99168fb3de299c88d9a
parent 9719a7e3d22abf02f8bf0dde4a079b7263f0f7e9
Author: Mattias Andrée <maandree@kth.se>
Date:   Sat, 27 Jul 2019 22:29:11 +0200

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

Signed-off-by: Mattias Andrée <maandree@kth.se>

Diffstat:
Mwhich.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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);