summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorpape <pape@smarden.org>2005-03-25 20:20:52 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2005-09-26 18:33:04 +1000
commit1b85b7bd778d3af055f92077a097f5bed1dfdbf5 (patch)
tree311f5b1b75cd65897925d594a62ba04f4ea12283 /src
parentGet rid of duplicate -g -O2 in CFLAGS. (diff)
downloaddash-1b85b7bd778d3af055f92077a097f5bed1dfdbf5.tar.gz
dash-1b85b7bd778d3af055f92077a097f5bed1dfdbf5.zip
Add trailing equal sign in setvar for variables set to null.
Diffstat (limited to '')
-rw-r--r--src/var.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/var.c b/src/var.c
index 3f10c46..a7791eb 100644
--- a/src/var.c
+++ b/src/var.c
@@ -232,7 +232,7 @@ setvar(const char *name, const char *val, int flags)
 	INTOFF;
 	p = mempcpy(nameeq = ckmalloc(namelen + vallen + 2), name, namelen);
 	*p++ = '\0';
-	if (vallen) {
+	if (val) {
 		p[-1] = '=';
 		p = mempcpy(p, val, vallen);
 	}