devices/asrc, cleanup #5/9, drop explicit NULL comparsion
This commit is contained in:
parent
b91386222e
commit
bd5ac3e4fc
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue