summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-07-17 14:11:25 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-07-17 14:11:25 +0000
commit222f86c4732bb5dc3df174b33f5bb7605f2fbed7 (patch)
tree949074299ada41aca807eb91b97e858deac31a14
parenta726649696ac45144dc2ee6745a227b2c3d904ff (diff)
downloadmandoc-222f86c4732bb5dc3df174b33f5bb7605f2fbed7.tar.gz
Remember to NULL-ify new keys/vals.
-rw-r--r--Makefile2
-rw-r--r--eqn.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a2b3d449..22156ca6 100644
--- a/Makefile
+++ b/Makefile
@@ -355,7 +355,7 @@ llib-lmandoc.ln: $(MANDOC_LNS)
# You'll need -ldb for Linux.
mandocdb: $(MANDOCDB_OBJS) libmandoc.a
- $(CC) -o $@ $(MANDOCDB_OBJS) libmandoc.a
+ $(CC) -o $@ $(MANDOCDB_OBJS) libmandoc.a -ldb
llib-lmandocdb.ln: $(MANDOCDB_LNS)
$(LINT) $(LINTFLAGS) -Cmandocdb $(MANDOCDB_LNS)
diff --git a/eqn.c b/eqn.c
index 9727f116..44a9c378 100644
--- a/eqn.c
+++ b/eqn.c
@@ -283,6 +283,7 @@ eqn_do_define(struct eqn_node *ep, int ln, int pos, const char **end)
ep->defs = mandoc_realloc
(ep->defs, ep->defsz *
sizeof(struct eqn_def));
+ ep->defs[i].key = ep->defs[i].val = NULL;
}
ep->defs[i].keysz = sz;