aboutsummaryrefslogtreecommitdiffstats
path: root/tests/serd_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-06-13 12:42:31 -0400
committerDavid Robillard <d@drobilla.net>2016-06-13 12:42:31 -0400
commitc7715b8b5ee48297c9a4fc0831556921d5f78fb0 (patch)
tree461990ee9bc37f87588ed6c46682fee49b86cbeb /tests/serd_test.c
parent8f7cac4752d427f833969d316542d7a82b4602ea (diff)
downloadserd-c7715b8b5ee48297c9a4fc0831556921d5f78fb0.tar.gz
serd-c7715b8b5ee48297c9a4fc0831556921d5f78fb0.tar.bz2
serd-c7715b8b5ee48297c9a4fc0831556921d5f78fb0.zip
Fix use of uninitialized fields
Fixes #1135
Diffstat (limited to 'tests/serd_test.c')
-rw-r--r--tests/serd_test.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index cfd658c4..a0a6c47f 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -602,10 +602,7 @@ main(void)
// Rewind and test reader
fseek(fd, 0, SEEK_SET);
- ReaderTest* rt = (ReaderTest*)malloc(sizeof(ReaderTest));
- rt->n_statements = 0;
- rt->graph = NULL;
-
+ ReaderTest* rt = (ReaderTest*)calloc(1, sizeof(ReaderTest));
SerdReader* reader = serd_reader_new(
SERD_TURTLE, rt, free,
NULL, NULL, test_sink, NULL);