diff options
| author | Juli Mallett <jmallett@FreeBSD.org> | 2002-10-09 01:51:00 +0000 |
|---|---|---|
| committer | Juli Mallett <jmallett@FreeBSD.org> | 2002-10-09 01:51:00 +0000 |
| commit | cf382f5bb1646fd96f9cb8c87b0638022d97f421 (patch) | |
| tree | 129bd23ca9c41dd9369b88407a388de17bea9cab | |
| parent | ce0d6fa4641ce13af2f3dd9b5fc9c86792f3791f (diff) | |
Notes
| -rw-r--r-- | usr.bin/make/main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 9e3895bcf8333..1093f1dc21e91 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -799,7 +799,7 @@ main(argc, argv) * <directory>:<directory>:<directory>... */ if (Var_Exists("VPATH", VAR_CMD)) { - char *vpath, *path1, *cp1, savec; + char *vpath, savec; /* * GCC stores string constants in read-only memory, but * Var_Subst will want to write this thing, so store it @@ -808,18 +808,18 @@ main(argc, argv) static char VPATH[] = "${VPATH}"; vpath = Var_Subst(NULL, VPATH, VAR_CMD, FALSE); - path1 = vpath; + path = vpath; do { /* skip to end of directory */ - for (cp1 = path1; *cp1 != ':' && *cp1 != '\0'; cp1++) + for (cp = path; *cp != ':' && *cp != '\0'; cp++) continue; /* Save terminator character so know when to stop */ - savec = *cp1; - *cp1 = '\0'; + savec = *cp; + *cp = '\0'; /* Add directory to search path */ - Dir_AddDir(dirSearchPath, path1); - *cp1 = savec; - path1 = cp1 + 1; + Dir_AddDir(dirSearchPath, path); + *cp = savec; + path = cp + 1; } while (savec == ':'); (void)free(vpath); } |
