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

This commit is contained in:
rlar 2015-04-11 21:26:36 +02:00
parent b91386222e
commit bd5ac3e4fc
7 changed files with 16 additions and 16 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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)
{

View File

@ -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)
{

View File

@ -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) {

View File

@ -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 */