which: Minor simplification
This commit is contained in:
parent
3b604b179c
commit
38cc01b887
6
which.c
6
which.c
|
@ -50,12 +50,10 @@ which(const char *path, const char *name)
|
||||||
if (i && ptr[i - 1] != '/')
|
if (i && ptr[i - 1] != '/')
|
||||||
fputc('/', stdout);
|
fputc('/', stdout);
|
||||||
puts(name);
|
puts(name);
|
||||||
if (!aflag) {
|
|
||||||
close(dirfd);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
close(dirfd);
|
close(dirfd);
|
||||||
|
if (!aflag && found)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
p = ptr + i + 1;
|
p = ptr + i + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user