aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit079f9d6fd490052a87a65b6b04bfb87b6ee3065d (patch)
treecd63960d07eaf4dc70a3f4838dedb84c7339f055
parent05b3c7b4a206baa8f5859dbe7b1121bb763d7e13 (diff)
downloadmandoc-079f9d6fd490052a87a65b6b04bfb87b6ee3065d.tar.gz
mandoc-079f9d6fd490052a87a65b6b04bfb87b6ee3065d.tar.zst
mandoc-079f9d6fd490052a87a65b6b04bfb87b6ee3065d.zip
Remember to NULL-ify new keys/vals.
-rw-r--r--Makefile2
-rw-r--r--eqn.c3
2 files changed, 3 insertions, 2 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 f0f00c62..43b30c9c 100644
--- a/eqn.c
+++ b/eqn.c
@@ -1,4 +1,4 @@
-/* $Id: eqn.c,v 1.8 2011/07/17 14:08:49 kristaps Exp $ */
+/* $Id: eqn.c,v 1.9 2011/07/17 14:11:25 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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;