summaryrefslogtreecommitdiff
path: root/src/comm
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-08-04 14:31:59 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-08-04 14:31:59 +0000
commit3ea4c3bfe12e488c41f241a2d9ad06260cae66e4 (patch)
treeb8a49e153109526f3454919788cc162c228d29fc /src/comm
parent310516be17f57367c66a312f6f60f85e906d0655 (diff)
Do not cast t_reduce_operator** to void** -- this is illegal in C,
because it may lead to writing a t_reduce_operator* into a void*, and these may have different sizes. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4103 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/comm')
-rw-r--r--src/comm/Reduction.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/comm/Reduction.c b/src/comm/Reduction.c
index ac59c265..ce29f62f 100644
--- a/src/comm/Reduction.c
+++ b/src/comm/Reduction.c
@@ -228,12 +228,13 @@ int CCTKi_RegisterReductionOperator(const char *thorn,
const char *name)
{
int handle;
+ void *tmp;
t_reduce_operator *reduce_operator;
/* Check that the method hasn't already been registered */
- handle = Util_GetHandle(ReductionOperators, name,
- (void **) &reduce_operator);
+ handle = Util_GetHandle(ReductionOperators, name, &tmp);
+ reduce_operator = tmp;
if(handle < 0)
{
reduce_operator = malloc (sizeof (t_reduce_operator));