summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2014-01-28 16:13:20 -0800
committerRuss Allbery <rra@stanford.edu>2014-01-28 18:36:23 -0800
commit50314ff63bbd4f28594685a8e966d4f354102980 (patch)
tree78508efa38dd296641a0dd32464681ae034a4c87 /util
parent5389f829d8e9f9431f6115c4e9fffb667d634f2e (diff)
Final cleanups of new rra-c-util and C TAP Harness
Add the NEWS entry for rra-c-util 5.2 and C TAP Harness 3.0, and synchronize the few small divergences from rra-c-util. Change-Id: Ieb70a2d554f221a052157d00875321605220d568 Reviewed-on: https://gerrit.stanford.edu/1425 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'util')
-rw-r--r--util/vector.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/util/vector.c b/util/vector.c
index efc6634..cdd70f7 100644
--- a/util/vector.c
+++ b/util/vector.c
@@ -51,8 +51,7 @@ vector_new(void)
{
struct vector *vector;
- vector = xmalloc(sizeof(struct vector));
- vector->count = 0;
+ vector = xcalloc(1, sizeof(struct vector));
vector->allocated = 1;
vector->strings = xcalloc(1, sizeof(char *));
return vector;
@@ -63,8 +62,7 @@ cvector_new(void)
{
struct cvector *vector;
- vector = xmalloc(sizeof(struct cvector));
- vector->count = 0;
+ vector = xcalloc(1, sizeof(struct cvector));
vector->allocated = 1;
vector->strings = xcalloc(1, sizeof(const char *));
return vector;