From 8e56d0c3a345bf118efca938d905283279035632 Mon Sep 17 00:00:00 2001 From: Henning Kiel Date: Fri, 31 Oct 2014 16:15:26 +0000 Subject: [PATCH] Recommit change from r23112 with appropriate fixes git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23118 f25d12d1-65f4-0310-ae8a-bbce733d8d8e --- SimulationRuntime/c/util/integer_array.c | 10 +++++----- SimulationRuntime/c/util/real_array.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/SimulationRuntime/c/util/integer_array.c b/SimulationRuntime/c/util/integer_array.c index 01de0f22f3c..41af2cb9e7a 100644 --- a/SimulationRuntime/c/util/integer_array.c +++ b/SimulationRuntime/c/util/integer_array.c @@ -1107,12 +1107,12 @@ void exp_integer_array(const integer_array_t * a, modelica_integer n, integer_ar clone_integer_array_spec(a,dest); copy_integer_array_data(*a,dest); } else { - integer_array_t* tmp = 0; - clone_integer_array_spec(a,tmp); - copy_integer_array_data(*a,tmp); + integer_array_t tmp; + clone_integer_array_spec(a,&tmp); + copy_integer_array_data(*a,&tmp); for( i = 1; i < n; ++i) { - mul_integer_matrix_product(a,tmp,dest); - copy_integer_array_data(*dest,tmp); + mul_integer_matrix_product(a,&tmp,dest); + copy_integer_array_data(*dest,&tmp); } } } diff --git a/SimulationRuntime/c/util/real_array.c b/SimulationRuntime/c/util/real_array.c index 830e5067478..fb8798f5e8c 100644 --- a/SimulationRuntime/c/util/real_array.c +++ b/SimulationRuntime/c/util/real_array.c @@ -1189,12 +1189,12 @@ void exp_real_array(const real_array_t * a, modelica_integer n, real_array_t* de clone_real_array_spec(a,dest); copy_real_array_data(*a,dest); } else { - real_array_t* tmp = 0; - clone_real_array_spec(a,tmp); - copy_real_array_data(*a,tmp); + real_array_t tmp; + clone_real_array_spec(a,&tmp); + copy_real_array_data(*a,&tmp); for(i = 1; i < n; ++i) { - mul_real_matrix_product(a,tmp,dest); - copy_real_array_data(*dest,tmp); + mul_real_matrix_product(a,&tmp,dest); + copy_real_array_data(*dest,&tmp); } } }