Browse Source

devices/asrc, cleanup #5/9, drop explicit NULL comparsion

pre-master-46
rlar 11 years ago
parent
commit
bd5ac3e4fc
  1. 4
      src/spicelib/devices/asrc/asrcacld.c
  2. 4
      src/spicelib/devices/asrc/asrcconv.c
  3. 4
      src/spicelib/devices/asrc/asrcfbr.c
  4. 4
      src/spicelib/devices/asrc/asrcload.c
  5. 4
      src/spicelib/devices/asrc/asrcpzld.c
  6. 8
      src/spicelib/devices/asrc/asrcset.c
  7. 4
      src/spicelib/devices/asrc/asrctemp.c

4
src/spicelib/devices/asrc/asrcacld.c

@ -28,8 +28,8 @@ ASRCacLoad(GENmodel *inModel, CKTcircuit *ckt)
NG_IGNORE(ckt);
for (; model != NULL; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here != NULL;
for (; model; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here;
here = here->ASRCnextInstance) {
difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15;

4
src/spicelib/devices/asrc/asrcconv.c

@ -21,8 +21,8 @@ ASRCconvTest(GENmodel *inModel, CKTcircuit *ckt)
double tol;
double rhs;
for (; model != NULL; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here != NULL;
for (; model; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here;
here = here->ASRCnextInstance) {
i = here->ASRCtree->numVars;

4
src/spicelib/devices/asrc/asrcfbr.c

@ -19,8 +19,8 @@ ASRCfindBr(CKTcircuit *ckt, GENmodel *inputModel, IFuid name)
int error;
CKTnode *tmp;
for (; model != NULL; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here != NULL;
for (; model; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here;
here = here->ASRCnextInstance) {
if (here->ASRCname == name) {
if (here->ASRCbranch == 0) {

4
src/spicelib/devices/asrc/asrcload.c

@ -28,8 +28,8 @@ ASRCload(GENmodel *inModel, CKTcircuit *ckt)
double difference;
double factor;
for (; model != NULL; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here != NULL;
for (; model; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here;
here=here->ASRCnextInstance)
{

4
src/spicelib/devices/asrc/asrcpzld.c

@ -27,8 +27,8 @@ ASRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
NG_IGNORE(s);
for (; model != NULL; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here != NULL;
for (; model; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here;
here = here->ASRCnextInstance)
{

8
src/spicelib/devices/asrc/asrcset.c

@ -25,8 +25,8 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
NG_IGNORE(states);
for (; model != NULL; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here != NULL;
for (; model; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here;
here=here->ASRCnextInstance) {
if (!here->ASRCtc1Given) here->ASRCtc1 = 0.0;
@ -143,10 +143,10 @@ ASRCunsetup(
ASRCmodel *model = (ASRCmodel *) inModel;
ASRCinstance *here;
for (; model != NULL;
for (; model;
model = model->ASRCnextModel)
{
for (here = model->ASRCinstances; here != NULL;
for (here = model->ASRCinstances; here;
here = here->ASRCnextInstance)
{
if (here->ASRCbranch) {

4
src/spicelib/devices/asrc/asrctemp.c

@ -15,8 +15,8 @@ ASRCtemp(GENmodel *inModel, CKTcircuit *ckt)
ASRCmodel *model = (ASRCmodel *) inModel;
ASRCinstance *here;
for (; model != NULL; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here != NULL;
for (; model; model = model->ASRCnextModel) {
for (here = model->ASRCinstances; here;
here = here->ASRCnextInstance) {
/* Default Value Processing for Source Instance */

Loading…
Cancel
Save