which: Minor simplification

This commit is contained in:
Michael Forney 2017-10-20 22:26:30 -07:00
parent 3b604b179c
commit 38cc01b887
1 changed files with 2 additions and 4 deletions

View File

@ -50,13 +50,11 @@ which(const char *path, const char *name)
if (i && ptr[i - 1] != '/')
fputc('/', stdout);
puts(name);
if (!aflag) {
}
close(dirfd);
if (!aflag && found)
break;
}
}
close(dirfd);
}
p = ptr + i + 1;
}
free(ptr);