tmalloc usage unification, parenthesize some terms

This commit is contained in:
rlar 2010-10-24 13:27:18 +00:00
parent 11c2ff1720
commit 15d12df25b
4 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2010-10-24 Robert Larice
* src/frontend/com_compose.c ,
* src/frontend/plotting/plotcurv.c ,
* src/maths/poly/interpolate.c :
tmalloc usage unification, parenthesize some terms
2010-10-24 Robert Larice
* src/spicelib/devices/asrc/asrcset.c ,
* src/xspice/mif/mif_inp2.c :

View File

@ -180,11 +180,11 @@ com_compose(wordlist *wl)
for (i = 0, blocksize = 1; i < dim - 1; i++)
blocksize *= dims[i];
if (realflag)
data = (double *) tmalloc(sizeof (double) * length *
blocksize);
data = (double *) tmalloc(sizeof (double) * (length *
blocksize));
else
cdata = (ngcomplex_t *) tmalloc(sizeof(ngcomplex_t) * length *
blocksize);
cdata = (ngcomplex_t *) tmalloc(sizeof(ngcomplex_t) * (length *
blocksize));
/* Now copy all the data over... If the sizes are too small
* then the extra elements are left as 0.

View File

@ -211,7 +211,7 @@ ft_graf(struct dvec *v, struct dvec *xs, bool nostart)
/* We need to do curve fitting now. First get some scratch
* space
*/
scratch = (double *) tmalloc((degree + 1) * (degree + 2) *
scratch = (double *) tmalloc(((degree + 1) * (degree + 2)) *
sizeof (double));
result = (double *) tmalloc((degree + 1) * sizeof (double));
xdata = (double *) tmalloc((degree + 1) * sizeof (double));

View File

@ -55,7 +55,7 @@ ft_interpolate(double *data, double *ndata, double *oscale, int olen,
else
sign = 1;
scratch = (double *) tmalloc((degree + 1) * (degree + 2) *
scratch = (double *) tmalloc(((degree + 1) * (degree + 2)) *
sizeof (double));
result = (double *) tmalloc((degree + 1) * sizeof (double));
xdata = (double *) tmalloc((degree + 1) * sizeof (double));