summaryrefslogtreecommitdiff
path: root/src/raptor_www.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2010-01-17 16:22:24 -0800
committerDave Beckett <dave@dajobe.org>2010-01-17 16:22:24 -0800
commit59fcf725a44d7cc84fdde710170fb6f572123844 (patch)
tree3d547d5d6da2cb98519589cef5465cf57afae8f7 /src/raptor_www.c
parent5904cc0b4700e2a29029f4ae085ef982d7e2c96d (diff)
downloadraptor-59fcf725a44d7cc84fdde710170fb6f572123844.tar.gz
Code style: use TYPE* var_name = RAPTOR_CALLOC(TYPE, 1, sizeof(*var_name))
This fix caught a few times where the calloc added an extra +1 - presumably from the usual thing you need to do with a string malloc. e.g. in raptor_new_json_writer(), raptor_new_turtle_writer() and raptor_new_xml_writer_v2() which probably were all from the same source.
Diffstat (limited to 'src/raptor_www.c')
-rw-r--r--src/raptor_www.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/raptor_www.c b/src/raptor_www.c
index a7989ed1..9733d603 100644
--- a/src/raptor_www.c
+++ b/src/raptor_www.c
@@ -162,7 +162,7 @@ raptor_www_finish_common(int skip_www_init_finish)
raptor_www*
raptor_www_new_with_connection_v2(raptor_world* world, void *connection)
{
- raptor_www* www = (raptor_www* )RAPTOR_CALLOC(www, 1, sizeof(raptor_www));
+ raptor_www* www = (raptor_www* )RAPTOR_CALLOC(www, 1, sizeof(*www));
if(!www)
return NULL;