diff options
author | harti <harti@FreeBSD.org> | 2005-05-12 15:54:52 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-05-12 15:54:52 +0000 |
commit | 36e83199cc6ea07195bed16d494abb24cd6b18cd (patch) | |
tree | 30f060b911a5633a887a6dac25a932b7174fe153 /usr.bin/make/main.c | |
parent | 8a553d2355a2ebf98fd5facbdb26efae0acafe18 (diff) | |
download | FreeBSD-src-36e83199cc6ea07195bed16d494abb24cd6b18cd.zip FreeBSD-src-36e83199cc6ea07195bed16d494abb24cd6b18cd.tar.gz |
Make sure machine is initialize before use. Also make two pointers const
to get rid of the last two const warnings.
Diffstat (limited to 'usr.bin/make/main.c')
-rw-r--r-- | usr.bin/make/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 596146b..ad20f32 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -662,8 +662,9 @@ main(int argc, char **argv) const char *machine_arch; const char *machine_cpu; Boolean outOfDate = TRUE; /* FALSE if all targets up to date */ - char *p, *p1, *pathp; - char *path; + char *p, *p1; + const char *pathp; + const char *path; char mdpath[MAXPATHLEN]; char obpath[MAXPATHLEN]; char cdpath[MAXPATHLEN]; @@ -721,7 +722,7 @@ main(int argc, char **argv) * __FreeBSD_version was defined as 300003. So, this check can * safely be done with any kernel with version > 300003. */ - if (!machine) { + if ((machine = getenv("MACHINE")) == NULL) { int ispc98; size_t len; @@ -740,7 +741,7 @@ main(int argc, char **argv) * Note that while MACHINE is decided at run-time, * MACHINE_ARCH is always known at compile time. */ - if ((machine = getenv("MACHINE")) == NULL) { + if (machine == NULL) { #ifdef MACHINE machine = MACHINE; #else |