aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@FreeBSD.org>2001-04-25 14:22:38 +0000
committerRuslan Ermilov <ru@FreeBSD.org>2001-04-25 14:22:38 +0000
commit43403d166ab0742d0a67f1d197e056e4c7109035 (patch)
tree79ff034d3ccaf7d8b2d37b0d1803bb46a47467aa /usr.bin/make
parent7b6630700d432a472c7192759a2213a5cabb47c5 (diff)
Notes
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/main.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index dc8c8c864f7f7..4ba3a6a8e3649 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -418,19 +418,11 @@ chdir_verify_path(path, obpath)
struct stat sb;
if (stat(path, &sb) == 0 && S_ISDIR(sb.st_mode)) {
- if (chdir(path)) {
+ if (chdir(path) == -1 || getcwd(obpath, MAXPATHLEN) == NULL) {
warn("warning: %s", path);
return 0;
}
- else {
- if (path[0] != '/') {
- (void) snprintf(obpath, MAXPATHLEN, "%s/%s",
- curdir, path);
- return obpath;
- }
- else
- return path;
- }
+ return obpath;
}
return 0;