summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--src/var.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e04f4e..3ddfd80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-03-25  Gerrit Pape <pape@smarden.org>
+
+	* Add trailing equal sign in setvar for variables set to null.
+
 2005-03-25  Herbert Xu <herbert@gondor.apana.org.au>
 
 	* Cleaned up src/Makefile.am.
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);
 	}