Skip to content

Commit

Permalink
use malloc instead of calloc becuase memory is immediately initialize…
Browse files Browse the repository at this point in the history
…d after allocation

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10809 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Henning Kiel committed Dec 21, 2011
1 parent 9c2869a commit 0e1e27b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimulationRuntime/c/math-support/model_help.c
Expand Up @@ -425,7 +425,7 @@ void initializeXDataStruc(_X_DATA *data)
data->simulationInfo.initial = 0;

/* initial delay */
data->simulationInfo.delayStructure = (RINGBUFFER**)calloc(data->modelData.nDelayExpressions, sizeof(RINGBUFFER*));
data->simulationInfo.delayStructure = (RINGBUFFER**)malloc(data->modelData.nDelayExpressions * sizeof(RINGBUFFER*));
ASSERT(data->simulationInfo.delayStructure, "out of memory");

for(i=0; i<data->modelData.nDelayExpressions; i++)
Expand Down

0 comments on commit 0e1e27b

Please sign in to comment.