summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/cond.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-05-12 15:41:02 +0000
committerharti <harti@FreeBSD.org>2005-05-12 15:41:02 +0000
commit1fa77b7e182e7ad25776a514edfa84ff7c2fe50b (patch)
tree16d771a2b30d090e8aa793a787e5d9789ac15bb1 /usr.bin/make/cond.c
parent8218c0d11c876124047355f4530af00214e03f85 (diff)
downloadFreeBSD-src-1fa77b7e182e7ad25776a514edfa84ff7c2fe50b.zip
FreeBSD-src-1fa77b7e182e7ad25776a514edfa84ff7c2fe50b.tar.gz
Use a variable initialized to a string instead of the string directly
to get rid of a const warning. Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.244)
Diffstat (limited to 'usr.bin/make/cond.c')
-rw-r--r--usr.bin/make/cond.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 8106523..a9209b1 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -476,11 +476,12 @@ CondToken(Boolean doEval)
t = EndOfFile;
break;
case '$': {
- char *lhs;
- char *rhs;
- const char *op;
- size_t varSpecLen = 0;
- Boolean doFree;
+ char *lhs;
+ const char *op;
+ char *rhs;
+ char zero[] = "0";
+ size_t varSpecLen = 0;
+ Boolean doFree;
/*
* Parse the variable spec and skip over it, saving its
@@ -557,7 +558,7 @@ CondToken(Boolean doEval)
default:
op = "!=";
- rhs = "0";
+ rhs = zero;
break;
}
if (*rhs == '"') {
OpenPOWER on IntegriCloud