Use XYOFFSET() instead of sctoff() in sector iterators

Old code didn't check value of sctoff() for success.  But it can't
fail, because we already took care of the condition that can make it
fail.  Moreover, the arguments are already normalized.  Therefore, we
can just call XYOFFSET().
This commit is contained in:
Markus Armbruster 2008-03-24 11:38:25 +01:00
parent a419904c70
commit d2ca7d4ed2
2 changed files with 2 additions and 2 deletions

View file

@ -319,7 +319,7 @@ bmnxtsct(struct nstr_sect *np)
if (np->curdist > np->dist) if (np->curdist > np->dist)
continue; continue;
} }
np->id = sctoff(np->x, np->y); np->id = XYOFFSET(np->x, np->y);
return 1; return 1;
} }
/*NOTREACHED*/ /*NOTREACHED*/

View file

@ -67,7 +67,7 @@ nxtsct(struct nstr_sect *np, struct sctstr *sp)
if (np->curdist > np->dist) if (np->curdist > np->dist)
continue; continue;
} }
np->id = sctoff(np->x, np->y); np->id = XYOFFSET(np->x, np->y);
if (!np->read(EF_SECTOR, np->id, sp)) if (!np->read(EF_SECTOR, np->id, sp))
continue; continue;
if (np->ncond == 0) if (np->ncond == 0)