(lnd_maxno): Variable's value is well-known constant N_MAXLAND + 1.
Useless, remove. Users changed to check lchr's sentinel, because that's clearer than comparing the index to N_MAXLAND or sizeof(lchr) / sizeof(*lchr). (lchr): Change sentinel's l_name to NULL.
This commit is contained in:
parent
190cbaadf2
commit
04c247f2da
4 changed files with 3 additions and 8 deletions
|
@ -117,11 +117,9 @@ make_new_list(int tlev, int type)
|
|||
lookup_list_cnt++;
|
||||
}
|
||||
} else if (type == EF_LAND) {
|
||||
for (lp = lchr, count = 0; count < lnd_maxno; count++, lp++) {
|
||||
for (lp = lchr; lp->l_name; lp++) {
|
||||
if (lp->l_tech > tlev)
|
||||
continue;
|
||||
if (lp->l_name == 0 || lp->l_name[0] == '\0')
|
||||
continue;
|
||||
lookup_list[lookup_list_cnt].l_u.lp = lp;
|
||||
lookup_list[lookup_list_cnt].tech = lp->l_tech;
|
||||
lookup_list_cnt++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue