projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b2f8d4
)
Avoid buffer[length] construct in yaz-ztest
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 10 Aug 2010 13:46:38 +0000
(15:46 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 10 Aug 2010 13:46:38 +0000
(15:46 +0200)
ztest/ztest.c
patch
|
blob
|
history
diff --git
a/ztest/ztest.c
b/ztest/ztest.c
index
6397831
..
50872a3
100644
(file)
--- a/
ztest/ztest.c
+++ b/
ztest/ztest.c
@@
-232,7
+232,7
@@
static void addterms(ODR odr, Z_FacetField *facet_field, const char *facet_name)
int index;
int freq = 100;
int length = strlen(facet_name) + 10;
- char key[length];
+ char *key = odr_malloc(odr, length);
key[0] = '\0';
for (index = 0; index < facet_field->num_terms; index++) {
Z_Term *term;