diff options
Diffstat (limited to 'src/mk_cheby.c')
| -rw-r--r-- | src/mk_cheby.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mk_cheby.c b/src/mk_cheby.c index b3019004..2c99acaf 100644 --- a/src/mk_cheby.c +++ b/src/mk_cheby.c @@ -91,14 +91,14 @@ mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV), if (ncu[j]) nru = j + 1; /* update row max */ if (ncv[j]) nrv = j + 1; } - if (T = makeT(nru, nrv)) { + if ((T = makeT(nru, nrv)) != NULL ) { T->a = a; T->b = b; T->mu = nru - 1; T->mv = nrv - 1; T->power = 1; for (i = 0; i < nru; ++i) /* store coefficient rows for u */ - if (T->cu[i].m = ncu[i]) + if ((T->cu[i].m = ncu[i]) != NULL) if ((p = T->cu[i].c = (double *)pj_malloc(sizeof(double) * ncu[i]))) for (j = 0; j < ncu[i]; ++j) @@ -106,7 +106,7 @@ mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV), else goto error; for (i = 0; i < nrv; ++i) /* same for v */ - if (T->cv[i].m = ncv[i]) + if ((T->cv[i].m = ncv[i]) != NULL) if ((p = T->cv[i].c = (double *)pj_malloc(sizeof(double) * ncv[i]))) for (j = 0; j < ncv[i]; ++j) @@ -114,7 +114,7 @@ mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV), else goto error; } - } else if (T = makeT(nru, nrv)) { + } else if ((T = makeT(nru, nrv)) != NULL) { /* else make returned Chebyshev coefficient structure */ T->mu = nru - 1; /* save row degree */ T->mv = nrv - 1; @@ -124,7 +124,7 @@ mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV), T->b.v = 1. / (b.v - a.v); T->power = 0; for (i = 0; i < nru; ++i) /* store coefficient rows for u */ - if (T->cu[i].m = ncu[i]) + if ((T->cu[i].m = ncu[i]) != NULL) if ((p = T->cu[i].c = (double *)pj_malloc(sizeof(double) * ncu[i]))) for (j = 0; j < ncu[i]; ++j) @@ -132,7 +132,7 @@ mk_cheby(projUV a, projUV b, double res, projUV *resid, projUV (*func)(projUV), else goto error; for (i = 0; i < nrv; ++i) /* same for v */ - if (T->cv[i].m = ncv[i]) + if ((T->cv[i].m = ncv[i]) != NULL) if ((p = T->cv[i].c = (double *)pj_malloc(sizeof(double) * ncv[i]))) for (j = 0; j < ncv[i]; ++j) |
