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:
parent
f18502a1d1
commit
a0fa4550a8
8 changed files with 11 additions and 11 deletions
|
@ -71,7 +71,7 @@ static enum bp_item_idx bud_key[I_MAX + 1] = {
|
|||
static struct bp *
|
||||
bp_ref(struct bp *bp, struct sctstr *sp)
|
||||
{
|
||||
return &bp[XYOFFSET(sp->sct_x, sp->sct_y)];
|
||||
return &bp[sp->sct_uid];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue