Use sctstr member sct_uid instead of recomputing it

The old code recomputed it with sctoff() in some places, without
checking for failure.  Not a bug, because it can't actually fail, just
confusing.
This commit is contained in:
Markus Armbruster 2008-03-24 10:53:56 +01:00
parent f18502a1d1
commit a0fa4550a8
8 changed files with 11 additions and 11 deletions

View file

@ -158,7 +158,7 @@ struct dchrstr {
#define SCT_TYPE_MAX 38
#define getsect(x, y, p) ef_read(EF_SECTOR, sctoff((x), (y)), (p))
#define putsect(p) ef_write(EF_SECTOR, sctoff((p)->sct_x, (p)->sct_y), (p))
#define putsect(p) ef_write(EF_SECTOR, (p)->sct_uid, (p))
#define getsectp(x, y) (struct sctstr *)ef_ptr(EF_SECTOR, sctoff((x), (y)))
#define getsectid(id) (struct sctstr *)ef_ptr(EF_SECTOR, (id))