Excape from doubly nested loop quickly for efficiency
This commit is contained in:
parent
7bd01a5873
commit
d65b12da84
1 changed files with 5 additions and 1 deletions
|
@ -571,10 +571,14 @@ if (name) { /* updating? */
|
|||
return SCPE_ARG;
|
||||
for (autp = auto_tab; autp->numc >= 0; autp++) {
|
||||
for (j = 0; (j < AUTO_MAXC) && autp->dnam[j]; j++) {
|
||||
if (strcmp (name, autp->dnam[j]) == 0)
|
||||
if (strcmp (name, autp->dnam[j]) == 0) {
|
||||
autp->numc = nctrl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((j < AUTO_MAXC) && autp->dnam[j] && (strcmp (name, autp->dnam[j]) == 0))
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (autp = auto_tab; autp->numc >= 0; autp++) { /* loop thru table */
|
||||
if (autp->amod) { /* floating csr? */
|
||||
|
|
Loading…
Add table
Reference in a new issue